minCanvasHeight.js 489 B

1234567891011121314151617181920212223242526
  1. $(function () {
  2. 'use strict';
  3. var $image = $(window.createCropperImage()),
  4. minCanvasHeight = 90;
  5. $image.cropper({
  6. strict: false,
  7. minCanvasHeight: minCanvasHeight,
  8. built: function () {
  9. QUnit.test('options.minCanvasHeight', function (assert) {
  10. var data = $image.cropper('setCanvasData', {
  11. height: 45
  12. }).cropper('getCanvasData');
  13. assert.ok(Math.round(data.height) === minCanvasHeight);
  14. });
  15. }
  16. });
  17. });