fix bug for wrong getClientRect calculation. close #50

This commit is contained in:
lavrton
2015-04-16 09:43:21 +07:00
parent c2154933d1
commit 41c10555bc
5 changed files with 72 additions and 35 deletions

View File

@@ -480,6 +480,41 @@ suite('Caching', function() {
compareLayerAndCanvas(layer, canvas, 150);
});
test('cache group with rectangle and text', function() {
var stage = addStage();
var layer = new Konva.Layer();
var button = new Konva.Group({
width: 100,
height: 50,
draggable: true
});
var face = new Konva.Rect({
fill: 'red',
x: 0, y: 0,
width: 100,
height: 50
});
var text = new Konva.Text({
text: 'Wrong button',
x: 15,
y: 20
});
button.add(face);
button.add(text);
button.cache();
layer.add(button);
stage.add(layer);
cloneAndCompareLayer(layer, 100);
});
test('cache layer with several shape with transform', function() {
var stage = addStage();