NodeLabelDraggingTool - Adding a line between a node and its floating label

Hi,

I’m using the NodeLabelDraggingTool and it’s work fine. Now i’m trying to add a dashed line between my “main” node and his “floating label”.
Here is a picture of what I want to do :

Capture

Any ideas ?

Thank you

I have extended the extensions/NodeLabelDragging.html node template to include a “tether” line between the node’s “ICON” element and its “LABEL” element. The code is at:

Thank you very much, that is exaclty what I wanted.
Have a nice day !

Hello,

I have the exact same requirement. But after some tests, I have a problem of rendering with links.

Animation

This behaviour happen under certain conditions. For example, with your initial model, it’s harder to reproduce. This bug doesn’t occur without the call of ‘computeTetherGeometry’ function.

With gojs-debug, I have a lot of “failure to validate parts” errors.

My minimal model in order to have the problem 100% of time:

{
   "class":"GraphLinksModel",
   "nodeKeyProperty":"id",
   "nodeDataArray":[
      {
         "id":0,
         "loc":"-260 0",
         "text":"Initial",
         "alignment":"0.5 0.5 -145.86074999999994 63.206325000000035"
      },
      {
         "id":1,
         "loc":"-260 120",
         "text":"First down",
         "alignment":"0.5 0.5 79.0079062499999 53.482275000000016"
      }
   ],
   "linkDataArray":[
      {
         "from":0,
         "to":1,
         "points":[
            -253.00561430174898,
            20.473149804255584,
            -244,
            46.83333333333333,
            -244,
            73.16666666666666,
            -253.00561430174898,
            99.52685019574443
         ]
      }
   ]
}

Thank you in advance for your help !
Martin

That’s wild. We’ll investigate. Thanks for reporting the bug in that sample.

The binding errors are because the conversion function isn’t returning a Geometry.

However, we’re still looking into the other problem.

Yes, indeed I notice that with gojs-debug. Thanks for your investigation.

Note: there seems to be an infinite loop when dropping the node when the link has disappeared.

Martin

Using an ofObject Binding on the Shape.geometry is causing there to be improper invalidation of panels, which causes that “failure” message and sometimes an infinite loop.

I have updated the Node Label Dragging with a tether line to the label sample. It now uses a custom PanelLayout in order to avoid the panel invalidations that happen when setting the Shape.geometry via a binding.

Thank Walter. Looks good to me!

Martin

A post was split to a new topic: LinkLabelDraggingTool - Adding a line between a link and its floating label