Add new method getClientRect(). rethink caching.

This commit is contained in:
lavrton
2015-02-12 14:10:36 +07:00
parent b9c6bc2d10
commit e39d7861c3
37 changed files with 1813 additions and 453 deletions

View File

@@ -91,4 +91,27 @@ suite('Blob', function(){
assert.equal(blob.eventListeners.pointsChange, undefined);
assert.equal(blob.eventListeners.tensionChange, undefined);
});
test('cache', function() {
var stage = addStage();
var layer = new Konva.Layer();
var blob = new Konva.Line({
x : 50,
y : 50,
points: [-25,50,250,-30,150,50,250,110],
stroke: 'blue',
strokeWidth: 10,
draggable: true,
fill: '#aaf',
tension: 0.3,
closed: true
});
blob.cache();
layer.add(blob);
stage.add(layer);
if (!window.mochaPhantomJS) {
cloneAndCompareLayer(layer, 50);
}
});
});