Problem with binding link points

Hi again,

I’m experiencing a problem with the conversion of link points. I have a binding to the points property on the data of my links. I’m saving it in alternating coordinates ([x,y,x,y,…]). I have a function which converts the link points to this format, but when i drag a node, it only updates once.

I have a codepen example

I tried to move the moment of conversion to anywhere after the dragging, and then there is no problem, but the points get saved in an unusable format
This one i have figured out, it is because i make a copy using. That was the reason i wanted the conversion in the twowaybinding


end edit

Ja: true
Kd: null
Y: 6
__gohashid: 49862
fo: null
p: Array[6]
    0: Object
        Ja: true
        L: 270
        M: 96
        __proto__: Object
    1: Object
    2: Object
    3: Object
    4: Object
    5: Object
length: 6
__proto__: Array[0]
__proto__: Object


So everything is OK now?

No it’s not, i still have the problem with the conversion function in the twowaybinding when dragging a node

106 ...
107 new go.Binding('points', 'points').makeTwoWay(fromPoints)
108 ...

It’s very suspicious to have a back-conversion function but no corresponding forward conversion function. The conversion functions must be inverses of each other.

Well since the points binding accepts an array of alternating x,y points i thought it would be unnecessary to have a forward conversion function.

I did add the function but it still does not work, you can view it in the codepen.

It’s a holiday today, and I’m unable to make any sense of all of the code in your codepen at first glance, so I’m sorry that I am unable to help you today. Maybe I can look at it later this weekend, or next week.

No problem, I have a workaround for now so there’s no hurry. I’ll reogranise the code example a bit so it’s more clear.
Enjoy your holiday!