mirror of
https://github.com/konvajs/konva.git
synced 2026-03-03 16:58:33 +08:00
all unit tests are now passing except for filter tests
This commit is contained in:
@@ -225,9 +225,7 @@
|
|||||||
* @memberof Kinetic.Node.prototype
|
* @memberof Kinetic.Node.prototype
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Kinetic.Factory.addGetter(Kinetic.Node, 'draggable', function() {
|
Kinetic.Factory.addGetter(Kinetic.Node, 'draggable', false);
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get draggable
|
* get draggable
|
||||||
|
|||||||
@@ -538,7 +538,7 @@
|
|||||||
y: this.attrs.y + it.getTranslation().y
|
y: this.attrs.y + it.getTranslation().y
|
||||||
};
|
};
|
||||||
|
|
||||||
this.setPosition(pos.x, pos.y);
|
this.setPosition({x:pos.x, y:pos.y});
|
||||||
this._setTransform(trans);
|
this._setTransform(trans);
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1507,7 +1507,7 @@ suite('Node', function() {
|
|||||||
//console.log(rect.getAbsoluteTransform().getTranslation())
|
//console.log(rect.getAbsoluteTransform().getTranslation())
|
||||||
|
|
||||||
stage.rotate(Math.PI / 3);
|
stage.rotate(Math.PI / 3);
|
||||||
stage.setScale(0.5);
|
stage.setScale({x:0.5, y:0.5});
|
||||||
|
|
||||||
stage.draw();
|
stage.draw();
|
||||||
|
|
||||||
@@ -1561,7 +1561,7 @@ suite('Node', function() {
|
|||||||
name: 'groupName',
|
name: 'groupName',
|
||||||
id: 'groupId',
|
id: 'groupId',
|
||||||
rotationDeg: 45,
|
rotationDeg: 45,
|
||||||
offset: [side / 2, side / 2],
|
offset: {x:side / 2, y:side / 2},
|
||||||
x: diagonal / 2,
|
x: diagonal / 2,
|
||||||
y: diagonal / 2
|
y: diagonal / 2
|
||||||
});
|
});
|
||||||
@@ -1850,9 +1850,9 @@ suite('Node', function() {
|
|||||||
layer.add(group);
|
layer.add(group);
|
||||||
stage.add(layer);
|
stage.add(layer);
|
||||||
|
|
||||||
circle.setPosition(100, 0);
|
circle.setPosition({x:100, y:0});
|
||||||
group.setPosition(100, 0);
|
group.setPosition({x: 100, y: 0});
|
||||||
layer.setPosition(100, 0);
|
layer.setPosition({x: 100, y: 0});
|
||||||
|
|
||||||
// test relative positions
|
// test relative positions
|
||||||
assert.equal(circle.getPosition().x, 100);
|
assert.equal(circle.getPosition().x, 100);
|
||||||
|
|||||||
@@ -18,8 +18,6 @@ suite('Image', function(){
|
|||||||
draggable: true
|
draggable: true
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(darth);
|
|
||||||
|
|
||||||
layer.add(darth);
|
layer.add(darth);
|
||||||
stage.add(layer);
|
stage.add(layer);
|
||||||
|
|
||||||
|
|||||||
@@ -18,8 +18,6 @@ suite('Rect', function(){
|
|||||||
layer.add(rect);
|
layer.add(rect);
|
||||||
stage.add(layer);
|
stage.add(layer);
|
||||||
|
|
||||||
console.log(rect);
|
|
||||||
|
|
||||||
assert.equal(rect.getX(), 100);
|
assert.equal(rect.getX(), 100);
|
||||||
assert.equal(rect.getY(), 50);
|
assert.equal(rect.getY(), 50);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user