mouseWheelZoom.js 515 B

12345678910111213141516171819202122232425262728
  1. $(function () {
  2. 'use strict';
  3. var $image = $(window.createCropperImage());
  4. $image.cropper({
  5. mouseWheelZoom: false,
  6. built: function () {
  7. var cropper = $image.data('cropper'),
  8. _ratio = cropper.image.ratio;
  9. QUnit.test('options.mouseWheelZoom', function (assert) {
  10. cropper.$cropper.trigger($.Event('wheel', {
  11. originalEvent: {
  12. wheelDelta: -120
  13. }
  14. }));
  15. assert.equal(cropper.image.ratio, _ratio);
  16. });
  17. }
  18. });
  19. });