mirror of
https://github.com/konvajs/konva.git
synced 2026-01-21 18:51:52 +08:00
enable tests
This commit is contained in:
15
konva.js
15
konva.js
@@ -19997,7 +19997,6 @@
|
|||||||
this.getParent()
|
this.getParent()
|
||||||
);
|
);
|
||||||
|
|
||||||
// we need to refactor that centeredScaling ASAP!
|
|
||||||
if (e.altKey) {
|
if (e.altKey) {
|
||||||
var topLeft = this.findOne('.top-left');
|
var topLeft = this.findOne('.top-left');
|
||||||
var bottomRight = this.findOne('.bottom-right');
|
var bottomRight = this.findOne('.bottom-right');
|
||||||
@@ -20018,20 +20017,6 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
absPos = topLeft.getAbsolutePosition(this.getParent());
|
absPos = topLeft.getAbsolutePosition(this.getParent());
|
||||||
|
|
||||||
// if (topOffsetX) {
|
|
||||||
// }
|
|
||||||
// var pos = this.findOne('.top-left').position();
|
|
||||||
// if (pos.x === 0 && pos.y === 0) {
|
|
||||||
// this.findOne('.top-left').setAttrs({
|
|
||||||
// x: this.getWidth() - this.findOne('.bottom-right').x(),
|
|
||||||
// y: this.getWidth() - this.findOne('.bottom-right').y()
|
|
||||||
// });
|
|
||||||
// absPos = this.findOne('.top-left').getAbsolutePosition(
|
|
||||||
// this.getParent()
|
|
||||||
// );
|
|
||||||
// } else {
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
x = absPos.x;
|
x = absPos.x;
|
||||||
|
|||||||
@@ -1235,7 +1235,7 @@ suite('Transformer', function() {
|
|||||||
assert.equal(pos.y, 110);
|
assert.equal(pos.y, 110);
|
||||||
});
|
});
|
||||||
|
|
||||||
test.only('if alt is pressed should transform around center', function() {
|
test('if alt is pressed should transform around center', function() {
|
||||||
var stage = addStage();
|
var stage = addStage();
|
||||||
var layer = new Konva.Layer();
|
var layer = new Konva.Layer();
|
||||||
stage.add(layer);
|
stage.add(layer);
|
||||||
|
|||||||
Reference in New Issue
Block a user