retejs / rete

JavaScript framework for visual programming
https://retejs.org
MIT License
10.17k stars 653 forks source link

Connection paths won't update on using rotate css on custom node! #504

Closed unvired2018 closed 1 year ago

unvired2018 commented 3 years ago

@Ni55aN to make diamond if I rotate div container to 45deg using transform the node rotates but the connections stays where they were previously!

Screenshot 2021-01-13 at 4 51 41 PM

Hatead1 commented 3 years ago

The socket position recounts relative to the node container, not absolutely. Rete knows nothing about you rotate div.

unvired2018 commented 3 years ago

The Sockets position before rotation is as expected! Screenshot 2021-01-13 at 6 52 05 PM

Hatead1 commented 3 years ago

The Sockets position before rotation is as expected!

Yep. But after rotation div offset* information does not change. https://github.com/retejs/rete/blob/6bdec4f575e7ba5690fe673a6547270863b5013a/src/view/socket.ts#L27

unvired2018 commented 3 years ago

I don't think it's socket that's an issue! The renderData() function calculation of connection path isn't updating! On inspect the socket is present at rotated position So, what's the solution? Is it a css thing?

Hatead1 commented 3 years ago

Socket coords for connection path returns by function getPosition() (link above).

unvired2018 commented 3 years ago

I've tried almost everything nothing works! Even tried to bindSocket individually with their div but the connection lines won't change! The offsetLeft and offsetWidth properties are get only.

rete-js[bot] commented 1 year ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.