-
Notifications
You must be signed in to change notification settings - Fork 433
performant css transformations and position updates #381
Comments
Hi @HFx6, thank you for the comment. |
Thanks for the quick response @anseki
Sorry if I my explanation wasn't very clear 😅, calling if it helps, this fiddle you made https://jsfiddle.net/y35sc1th/ is similar to what I have in my environment, however, the wrapping div of the "nodes" allows you to pan around infinitely. |
Do you mean that LeaderLine is slow? |
Thanks for the link, ill see if can call
You're right that its not LeaderLine specifically slow, but for example if i move a collection of 4 items all connected via a LeaderLine (like my image), the CSS transform is extremely degraded and consumes a large amount of memory. I was hoping you'd had run into this case before and found an elegant solution (e.g. passing in offset references to the anchor point).
Yup, LeaderLine and PlainDraggable are excellent libraries and I switched to them due to your use of efficient animation handling. the issue doesn't exist in that example, but if you were to "pan" in the canvas while calling |
Could you show me an example to reproduce that? |
I will try a couple more attempts using your anim-event lib, and try some more performant management of the LeaderLines first. Bit of a hassle to reduce my react code to jsfiddle to show off this specific thing; because of many things that could be causing this, i will try and investigate more to see how I can I best replicate this node editor. |
Sorry, I couldn't understand your words well. |
No reply came, then this abandoned issue is closed. |
What's the recommended way to perform css transformations on the leader-line svgs in order to keep them consistent with their connected items?
My DOM hierarchy is similar to
I have moved the svgs into their owner wrapper after line creation to make moving them easier.
An example view can be seen here of how a setup could be constructed where the "canvas" is panned across (in reality is just moves the node-wrapper position as the user drags)
The issue is "solved" to call
line.position()
on pan, but its not performant and lags with only a handful of lines. Is there a better way to solve this with leader-line?I'm using this in a react environment, I keep reference to all connections, nodes and line instances.
I had made my own bezier connector line solution where each socket position used a reference
offset{}
based on the current "pan", which very efficient when moving many connections, can leader-line do something similar?The text was updated successfully, but these errors were encountered: