mirror of
https://github.com/konvajs/konva.git
synced 2025-10-15 12:34:52 +08:00
added integration test for hiding the stage
This commit is contained in:
@@ -814,6 +814,38 @@ Test.Modules.LAYER = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Test.Modules.STAGE = {
|
||||||
|
'hide stage': function(containerId) {
|
||||||
|
var stage = new Kinetic.Stage({
|
||||||
|
container: containerId,
|
||||||
|
width: 578,
|
||||||
|
height: 200
|
||||||
|
});
|
||||||
|
var layer = new Kinetic.Layer();
|
||||||
|
var circle = new Kinetic.Circle({
|
||||||
|
x: stage.getWidth() / 2,
|
||||||
|
y: stage.getHeight() / 2,
|
||||||
|
radius: 70,
|
||||||
|
fill: 'green',
|
||||||
|
stroke: 'black',
|
||||||
|
strokeWidth: 4
|
||||||
|
});
|
||||||
|
|
||||||
|
layer.add(circle);
|
||||||
|
stage.add(layer);
|
||||||
|
|
||||||
|
stage.hide();
|
||||||
|
|
||||||
|
stage.toDataURL({
|
||||||
|
callback: function(dataUrl) {
|
||||||
|
testDataUrl(dataUrl, 'cleared', 'stage should not be visible');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
stage.draw();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
Test.Modules.SHAPE = {
|
Test.Modules.SHAPE = {
|
||||||
'scale rect with stroke scale disabled': function(containerId) {
|
'scale rect with stroke scale disabled': function(containerId) {
|
||||||
var stage = new Kinetic.Stage({
|
var stage = new Kinetic.Stage({
|
||||||
|
Reference in New Issue
Block a user