Frage

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.

War es hilfreich?

Lösung

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top