大部分问题来自可拖动对象初始状态茎:假
这是我的解决方案,到目前为止,希望它带给你更接近:http://jsfiddle.net/EwrkQ/4/
darthVaderImg.on('mouseover', function() {
document.body.style.cursor = 'move';
});
darthVaderImg.on('mousedown', function() {
this.moveTo(temp);
this.setDraggable(true);
this.simulate('dragstart');
layer.draw();
temp.draw();
});
darthVaderImg.on('dragmove', function() {
temp.draw();
});
darthVaderImg.on("dragend",function(){
//this.setDraggable(false);
this.moveTo(layer);
layer.draw();
temp.draw();
this.off("mouseup");
});
darthVaderImg.on('mouseout', function() {
document.body.style.cursor = 'default';
});
你看到小提琴吗?我已经做到了... – jure 2013-03-06 23:02:06
EliteOctagon,你能帮我吗?谢谢 – jure 2013-03-07 00:41:33