문제

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