Link.points is not available in the "LinkDrawn" DiagramEvent

Thanks walter the above ans helped, I have another question related to links,

LinkDrawn event callback
when I print the, links
i get the whole object but when i print only the points (like:
its gives me undefined, so basically the whole object is coming but only points array is giving me undefined.

in link template i have used

to functions to convert the points based on my reuirement.
Do you have any solution that i get those points as array not undefined.
Basically the points is getting filled late

Yes, the “LinkDrawn” DiagramEvent happens after the user has finished drawing a new link using the LinkingTool. That happens before any layout might happen, which in turn is before links are routed. When routing happens, the Link.points property will be set to a new List of Points, and that is when bindings will get evaluated.

I recommend that you not implement your own conversion functions for the Link.points property. When you serialize/deserialize your model you can do any conversions then. In fact, the default behavior of Model.toJson and Model.fromJson convert an Array of Points that is the value of the “points” property to be an Array of numbers.

I have a use case where i need to send to backend on every successfull link connection i need the points,
currently i fixed it using setTimeout() with no delay callback, is it good solution?

As I just mentioned in another topic: GoJS Changed Events -- Northwoods Software