mirror of
https://github.com/konvajs/konva.git
synced 2026-01-02 20:42:42 +08:00
added more functional tests
This commit is contained in:
@@ -572,45 +572,6 @@ Test.prototype.tests = {
|
||||
|
||||
stage.add(layer);
|
||||
},
|
||||
'EVENTS - group click events': function(containerId) {
|
||||
var stage = new Kinetic.Stage({
|
||||
container: containerId,
|
||||
width: 578,
|
||||
height: 200
|
||||
});
|
||||
var layer = new Kinetic.Layer();
|
||||
var group = new Kinetic.Group();
|
||||
|
||||
group.on('click', function() {
|
||||
log('click group');
|
||||
//console.log(this);
|
||||
});
|
||||
var redEllipse = new Kinetic.Ellipse({
|
||||
x: stage.getWidth() / 2,
|
||||
y: stage.getHeight() / 2,
|
||||
radius: 80,
|
||||
strokeWidth: 4,
|
||||
fill: 'red',
|
||||
stroke: 'black',
|
||||
name: 'red'
|
||||
});
|
||||
|
||||
var greenEllipse = new Kinetic.Ellipse({
|
||||
x: stage.getWidth() / 2,
|
||||
y: stage.getHeight() / 2,
|
||||
radius: 40,
|
||||
strokeWidth: 4,
|
||||
fill: 'green',
|
||||
stroke: 'black',
|
||||
name: 'green'
|
||||
});
|
||||
|
||||
group.add(redEllipse);
|
||||
group.add(greenEllipse);
|
||||
|
||||
layer.add(group);
|
||||
stage.add(layer);
|
||||
},
|
||||
'EVENTS - group mousemove events': function(containerId) {
|
||||
var stage = new Kinetic.Stage({
|
||||
container: containerId,
|
||||
|
||||
Reference in New Issue
Block a user