mirror of
https://github.com/konvajs/konva.git
synced 2025-09-18 18:27:58 +08:00
added stage transition resize manual test
This commit is contained in:
@@ -1388,5 +1388,34 @@ Test.Modules.DRAG_AND_DROP = {
|
||||
stage.add(layer);
|
||||
|
||||
|
||||
},
|
||||
'*transition stage width': function(containerId) {
|
||||
var stage = new Kinetic.Stage({
|
||||
container: containerId,
|
||||
width: 578,
|
||||
height: 200
|
||||
});
|
||||
|
||||
var layer = new Kinetic.Layer();
|
||||
|
||||
layer.canvas.element.style.backgroundColor = 'blue';
|
||||
|
||||
var rect = new Kinetic.Rect({
|
||||
x: 10,
|
||||
y: 10,
|
||||
width: 100,
|
||||
height: 50,
|
||||
fill: 'red'
|
||||
});
|
||||
|
||||
layer.add(rect);
|
||||
stage.add(layer);
|
||||
|
||||
stage.transitionTo({
|
||||
width: 300,
|
||||
duration: 2
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
|
@@ -6,6 +6,7 @@ Test.Modules.STAGE = {
|
||||
height: 200
|
||||
});
|
||||
},
|
||||
|
||||
'instantiate stage with dom element': function(containerId) {
|
||||
var containerDom = document.getElementById(containerId);
|
||||
var stage = new Kinetic.Stage({
|
||||
|
Reference in New Issue
Block a user