rete icon indicating copy to clipboard operation
rete copied to clipboard

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

Open unvired2018 opened this issue 5 years ago • 6 comments

@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

unvired2018 avatar Jan 13 '21 11:01 unvired2018

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

Hatead1 avatar Jan 16 '21 10:01 Hatead1

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

unvired2018 avatar Jan 18 '21 06:01 unvired2018

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

Hatead1 avatar Jan 18 '21 08:01 Hatead1

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?

unvired2018 avatar Jan 18 '21 08:01 unvired2018

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

Hatead1 avatar Jan 18 '21 09:01 Hatead1

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.

unvired2018 avatar Mar 04 '21 12:03 unvired2018

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.

rete-js[bot] avatar Jul 13 '23 10:07 rete-js[bot]