How to get new Coordinat after drag Node ?
I tried use “mouseDragOver” but console says “Uncaught Error: Trying to set undefined property “mouseDragOver” on object: Node#426”
How to get new Coordinat after drag Node ?
I tried use “mouseDragOver” but console says “Uncaught Error: Trying to set undefined property “mouseDragOver” on object: Node#426”
That error is correct – there is no such property. Maybe you want: GraphObject.mouseDragEnter and mouseDragLeave. GraphObject | GoJS API
Given a Node, you can get its lat/long via node.data.latlong
.
I have added the code, but nothing happen when I drag the node.
please look at this Leaflet.js and GoJS
what I mean is for correcting location from London to Oxford or Brighton, not from node to another node. see Leaflet GOJS move Node - YouTube
Thank You
The mouseDragEnter and mouseDragLeave events, as documented, are raised when the user drags some other node onto the node with those event handlers. That way you can notice when something is dragged onto a GraphObject, or dragged out of a GraphObject.
If you want to do something when the drag is finished, implement a “SelectionMoved” DiagramEvent listener. GoJS Events -- Northwoods Software
I have implement “SelectionMoved”, but still can’t find New Coordinat (Lat / Lng) properties. How to get it ?
Hence, something like:
new go.Diagram(. . ., {
. . .,
"SelectionMoved": e => {
e.subject.each(part => {
if (part instanceof go.Node) . . . part.data.latlong . . .
});
}
});
Thank You very much, You are awesome.