automatically change transformer on shape changes. close #391

This commit is contained in:
Anton Lavrenov
2018-05-17 07:22:21 +09:00
parent 320ec87b2e
commit 74d3a12921
5 changed files with 47 additions and 9 deletions

View File

@@ -315,9 +315,7 @@ suite('Manual', function() {
});
// ======================================================
test('create image hit region with pixelRatio, look at hit, test hit with mouseover', function(
done
) {
test('create image hit region with pixelRatio, look at hit, test hit with mouseover', function(done) {
var imageObj = new Image();
Konva.pixelRatio = 2;
@@ -357,9 +355,7 @@ suite('Manual', function() {
});
// ======================================================
test('image hit region with alpha threshold, mouseover circle', function(
done
) {
test('image hit region with alpha threshold, mouseover circle', function(done) {
var stage = addStage();
var layer = new Konva.Layer();
stage.add(layer);

View File

@@ -100,6 +100,8 @@ suite('Transformer', function() {
assert.equal(tr.y(), rect.y());
assert.equal(tr.width(), rect.width());
assert.equal(tr.height(), rect.height());
assert.equal(tr.findOne('.back').width(), rect.width());
console.log(tr);
});
test('add transformer for transformed rect', function() {