I have a lot of Raphael elements which I push into an array:
var start = function () {
this.ox = this.attr("cx");
this.oy = this.attr("cy");
},
move = function (dx, dy) {
this.attr({cx: this.ox + dx, cy: this.oy + dy});
}
for(var i = 0; i < 149; i++) {
cubes = paper.rect(Math.floor(Math.random()*2000), Math.floor(Math.random()*2000), 0, 0);
cubes.animate({ width: 25, height: 25 }, 500, "bounce");
cubesmixed.push(cubes);
cubesmixed[i].drag(move, start);
}
but unfortunatly I can't drag them. The most weird thing is, that start
and move
fire as they should. But why do they don't move.
Thanks in advance!