mirror of
https://github.com/konvajs/konva.git
synced 2026-03-03 16:58:33 +08:00
changed offset to center
This commit is contained in:
@@ -13,7 +13,7 @@ suite('Image', function(){
|
||||
image: imageObj,
|
||||
width: 100,
|
||||
height: 100,
|
||||
offset: {x: 50, y: 30},
|
||||
center: {x: 50, y: 30},
|
||||
crop: {x: 135, y: 7, width: 167, height: 134},
|
||||
draggable: true
|
||||
});
|
||||
@@ -31,8 +31,8 @@ suite('Image', function(){
|
||||
assert.equal(darth.getY(), 60);
|
||||
assert.equal(darth.getWidth(), 100);
|
||||
assert.equal(darth.getHeight(), 100);
|
||||
assert.equal(darth.getOffset().x, 50);
|
||||
assert.equal(darth.getOffset().y, 30);
|
||||
assert.equal(darth.center().x, 50);
|
||||
assert.equal(darth.center().y, 30);
|
||||
assert.equal(Kinetic.Util._isElement(darth.getImage()), true);
|
||||
|
||||
var crop = null;
|
||||
@@ -88,7 +88,8 @@ suite('Image', function(){
|
||||
image: imageObj,
|
||||
width: 100,
|
||||
height: 100,
|
||||
offset: [50, 30],
|
||||
centerX: 50,
|
||||
centerY: 30,
|
||||
crop: {x: 135, y: 7, width: 167, height: 134},
|
||||
draggable: true
|
||||
});
|
||||
@@ -301,7 +302,7 @@ suite('Image', function(){
|
||||
image: imageObj,
|
||||
width: 100,
|
||||
height: 100,
|
||||
offset: {x: 50, y:30},
|
||||
center: {x: 50, y:30},
|
||||
draggable: true,
|
||||
opacity: 0.5,
|
||||
shadowColor: 'black',
|
||||
@@ -336,7 +337,7 @@ suite('Image', function(){
|
||||
image: imageObj,
|
||||
width: 100,
|
||||
height: 100,
|
||||
offset: {x: 50, y: 30},
|
||||
center: {x: 50, y: 30},
|
||||
draggable: true,
|
||||
opacity: 0.5,
|
||||
shadowColor: 'black',
|
||||
|
||||
Reference in New Issue
Block a user