fixed multiple bugs related to toDataURL() when using hidden layers

This commit is contained in:
ericdrowell
2012-10-07 19:38:12 -07:00
parent 432533ae4a
commit f74955641a
5 changed files with 31 additions and 10 deletions

View File

@@ -937,18 +937,19 @@ Test.prototype.tests = {
test(!layer2.isVisible(), 'layer2 should be invisible');
test(layer2.canvas.element.style.display === 'none', 'layer canvas element display should be none');
//console.log(layer2.toDataURL());
//console.log(layer1.toDataURL());
stage.toDataURL({
callback: function(dataUrl) {
//console.log(dataUrl);
layer2.show();
//test(layer2.isVisible(), 'layer2 should be visible');
//test(layer2.canvas.element.style.display === 'block', 'layer canvas element display should be block');
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({