Hi, I am trying to implement a custom cursor for our error validation link - i.e. when a link is disabled, 1) the cursor should turn into this new red arrow cursor, 2) this red cross icon should appear at the end of the link connection line.
Do you guys have any suggestions for how we can do this? I have checked the gojs cursors and couldn’t find any ways to change the colour.
Additionally, when dragging the connection line there is this default blue colour, I have checked ways for binding and changing the line colour but colour changes were still not applied to when the line is being dragged.
Second, about showing that white X on a red square only when a proposed link is invalid, you can customize the linking operation by setting LinkingTool.portTargeted. LinkingBaseTool | GoJS API
When your function receives null as the first (and second) arguments, change the temporaryToPort or temporaryFromPort to be that X-in-square, if it isn’t already. When the first argument is not null, change it back to what you want it to be when a link would be valid, if it isn’t already. By default the temporary ports are Shapes with a null fill and a magenta stroke with strokeWidth 2.
thanks! the first worked. For the temporary to and from ports, can the x-in-a-square be defined as an image or does this have to be a custom shape? I can’t seem to tweak the parameters to achieve the exact design