I have a big morph with dozens of submorphs. The submorphs are of two kinds: pieces and squares.
I have googled a lot and read quite a bit of Morphic documentation, but somehow I can’t get it to work. I have not yet found a document that clearly explains what to do.
Currently, the pieces won’t be dragged (except when I Alt-click on them). The squares have implemented the mouseEnterDragging and mouseLeaveDragging methods and they are being called (they change the color of the squares, so it’s easy to spot). But it’s like something invisible is being dragged.
What I want: the pieces should be draggable, just by holding down the left mouse button and moving the mouse, not by using Alt-click to bring up the halo. The squares should not be draggable. The pieces should be droppable on squares, but not on pieces.
Which methods should I implement/override?
enableDrag: true
to the pieces?startDrag:
sendgrabMorph:
. Depending on the result, you may need to do more. Not sure if you also need toremoveMorph:
the piece from its owner.