mirror of
https://github.com/konvajs/konva.git
synced 2025-11-18 09:07:30 +08:00
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:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user