aboutsummaryrefslogtreecommitdiffstats
path: root/library/cropperjs/test/methods/moveTo.js
blob: e8bf0eebdc9911e736d5d6ba096101a6f35075fd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
QUnit.test('methods#moveTo', function (assert) {
  var done = assert.async();
  var util = window.Util;
  var image = util.createImage();

  assert.expect(2);

  return new Cropper(image, {
    ready: function () {
      var cropper = this.cropper;
      var canvasData = cropper.moveTo(0, 0).getCanvasData();

      assert.strictEqual(canvasData.left, 0);
      assert.strictEqual(canvasData.top, 0);

      done();
    }
  });
});