Is it possible to do the drag and drop from stage1 to stage2 ? stage1 would be containing the draggable shapes, and stage2 would be the target.

有帮助吗?

解决方案

Yes, you can, with something like this:

image.on('dragmove', function() {
    if ((!stage.getPointerPosition()) && image.getParent() !== layer2) {

      image.stopDrag();

      image.moveTo(layer2);
      image.position(stage2.getPointerPosition());
      image.startDrag();
      layer.draw();
      layer2.draw();      
    }
})

DEMO

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top