added another functional test to cover more transform and drag and drop cases

This commit is contained in:
Eric Rowell 2012-03-25 22:58:07 -07:00
parent 1f41e931b9
commit eaab71e242

View File

@ -948,7 +948,6 @@ Test.prototype.tests = {
log(evt.shape.getName());
});
var redCircle = new Kinetic.Circle({
x: stage.width / 2,
y: stage.height / 2,
@ -1378,6 +1377,35 @@ Test.prototype.tests = {
layer.add(group);
stage.add(layer);
},
'DRAG AND DROP - translate, rotate, and scale shape, and then drag and drop': function(containerId) {
var stage = new Kinetic.Stage({
container: containerId,
width: 578,
height: 200
});
var layer = new Kinetic.Layer();
var group = new Kinetic.Group();
var rect = new Kinetic.Rect({
x: 200,
y: 100,
width: 100,
height: 50,
fill: 'red',
stroke: 'black',
strokeWidth: 4,
draggable: true,
rotationDeg: 60,
scale: {
x: 2,
y: 1
}
});
group.add(rect);
layer.add(group);
stage.add(layer);
},
'STAGE - save image as png (click on circle to open new window)': function(containerId) {
var stage = new Kinetic.Stage({
container: containerId,