zoom.js 566 B

12345678910111213141516171819202122232425262728
  1. $(function () {
  2. 'use strict';
  3. var $image = $(window.createCropperImage());
  4. $image.cropper({
  5. built: function () {
  6. var cropper = $image.data('cropper'),
  7. image = cropper.image;
  8. QUnit.test('methods.zoom', function (assert) {
  9. var width = image.width,
  10. height = image.height;
  11. $image.cropper('zoom', 0.1);
  12. assert.ok(image.width > width);
  13. assert.ok(image.height > height);
  14. assert.notEqual(image.width, width);
  15. assert.notEqual(image.height, height);
  16. });
  17. }
  18. });
  19. });