mirror of
https://github.com/konvajs/konva.git
synced 2025-11-08 02:24:44 +08:00
now that the attrs engine has been rewritten, we can cleanly hide and show the layer canvas whenever the layer is hidden or shown via instantiation or with setters. Also improved layer hide and show unit test
This commit is contained in:
@@ -1075,9 +1075,11 @@ Test.prototype.tests = {
|
||||
|
||||
layer2.hide();
|
||||
test(!layer2.isVisible(), 'layer2 should be invisible');
|
||||
test(layer2.canvas.element.style.display === 'none', 'layer canvas element display should be none');
|
||||
|
||||
layer2.show();
|
||||
test(layer2.isVisible(), 'layer2 should be visible');
|
||||
test(layer2.canvas.element.style.display === 'block', 'layer canvas element display should be block');
|
||||
},
|
||||
'LAYER - beforeDraw and afterDraw': function(containerId) {
|
||||
var stage = new Kinetic.Stage({
|
||||
|
||||
Reference in New Issue
Block a user