Is it possible and what is the proper approach to be able to move a node on a diagram canvas when holding a right button and draw a link from a node when holding the left button? I am trying to overcome a usability problem when there is a small area in the centre of a node which, when clicked, allows to move the node and if clicked outside of that area, allows to draw a link. This approach is not very useful, often times user expects the node to move but a link is being drawn or vice versa, the user expects to draw a link but the node is being moved. This limit between the centre area and the rest is somewhat blurry where right or left mouse click would strictly distinguish between those two actions.
I believe what you are asking for is possible, but I very much recommend that you instead make that draggable area in the node larger, and the linkable area smaller – perhaps down to a narrow area at one side or on all sides.
What is the outline of your node template? From the top down to the port(s); I don’t care about unrelated elements and unrelated properties. A screenshot might be useful too.
This is an example of a selected node. The close button and border is adornment.
It consists of an Auto node which has a Vertical panel for icon and a transparent shape of size 30, 30 with a move cursor which serves as moving area to take a node for dragging.
The Vertical panel also has a Text Block inside it for displaying text. Also, the Vertical panel has fromLinkable, toLinkable set and portId is ’ ’ to make the whole node as a single port.
So whenever user hovers over the center shape they can drag the node and everything else they can draw a link.
Why you don’t recommend to use right mouse button for dragging?
Using the right mouse button for dragging is very unusual. And how would that work on a touch device? But it could be done…
Still, I recommend that you add a “transparent” “Circle” Shape in front of and in the middle of your big circular icon, with fromLinkable and toLinkable set to false. If you make that new circular shape a bit smaller than but still concentric with that big circular icon, a mouse down anywhere on that new shape will support selection and dragging. Whereas a mouse down and drag along the outside of that new shape, but still within the big icon, can continue to be used for starting to draw a new link.