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:
ericdrowell
2012-09-25 12:22:22 -07:00
parent 74bef1e108
commit d522b9d9d0
4 changed files with 22 additions and 40 deletions

View File

@@ -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({