when calling layer.hide() or show(), the physical canvas element is hidden and shown rather than clearing and redrawing the layer. This greatly improves hide and show performance for layers

This commit is contained in:
Eric Rowell
2012-09-18 09:25:16 -07:00
parent 0f2cee5499
commit d0a1b2870e
4 changed files with 42 additions and 5 deletions

View File

@@ -942,9 +942,10 @@ Test.prototype.tests = {
test(layer2.isVisible(), 'layer2 should be visible');
layer2.hide();
layer2.draw();
test(!layer2.isVisible(), 'layer2 should be invisible');
layer2.show();
test(layer2.isVisible(), 'layer2 should be visible');
},
'LAYER - beforeDraw and afterDraw': function(containerId) {
var stage = new Kinetic.Stage({