Link created on single click


#1

Normal behavior seems to be for a link to be created to the nearest port on single click of a port. Can’t find any mention of this feature anywhere in the various documentation files. Is there a property to set somewhere to disable this action, or will I need to subclass all the ports, and if so, what must I override?


#2

Yes, the standard behavior is to permit starting drawing a new link on a mouse down. Past experience has shown that in situations where you want to make it easy to draw new links, GoDiagram’s default design is best. It’s certainly better than using multiple mouse gestures, which some drawing applications require.
If instead you only want to start drawing a new link when the mouse has moved, you can just move the new-link-drawing-tool from the GoView’s MouseDownTools list to its MouseMoveTools list. This is also needed if you want to be able to select a GoPort by clicking on it.
// Allow ports to be selected, by only starting to draw a new link upon a mouse move
IGoTool itool = myView.ReplaceMouseTool(typeof(GoToolLinkingNew), null);
myView.MouseMoveTools.Insert(0, itool);


#3

Thank you, that does it. This request was for a customer who was unhappy with the behavior, so we have added a run time option to disable it. However, now that it is done, we happily do not find any reduction in functionality or intuitiveness. In fact the only difference seems to be a reduced likelihood of creating links by mistake. I wonder if this should not be a settable property of the view.