Ticket/InsdepUI/plugin/cropper-2.3.4/test/options/scalable.js

(完整代码) 851B

$(function () {

  'use strict';

  var $image = $(window.createCropperImage());
  var $image2 = $(window.createCropperImage());

  $image.cropper({
    built: function () {
      var cropper = $image.data('cropper');
      var image = cropper.image;

      QUnit.test('options#scalable: true', function (assert) {
        $image.cropper('scale', 2, -2);

        assert.equal(image.scaleX, 2);
        assert.equal(image.scaleY, -2);
      });

    }
  });

  $image2.cropper({
    scalable: false,

    built: function () {
      var cropper = $image2.data('cropper');
      var image = cropper.image;

      QUnit.test('options#scalable: false', function (assert) {
        $image2.cropper('scale', 2, -2);

        assert.ok(typeof image.scaleX === 'undefined');
        assert.ok(typeof image.scaleY === 'undefined');
      });

    }
  });

});

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。