blob: c2ead841233e408dbee792666f5906d0f0a10851 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
QUnit.test('methods#move', 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.getCanvasData();
var changedCanvasData = cropper.move(1, 1).getCanvasData();
assert.strictEqual(changedCanvasData.left, canvasData.left + 1);
assert.strictEqual(changedCanvasData.top, canvasData.top + 1);
done();
}
});
});
|