Closed vukic-makro closed 1 year ago
Hi @vukic-makro, thank you for the comment. Sorry, my English is poor. Do you mean that you want to do something when the moving the draggable element started?
Hey @anseki Basically what i need to happen is that before user has interacted with my component the draggable divs float like 10 pixels up and down.
Leader lines which I have in between should also sync with that movement.
All of this needs to happen on load of the page and they should stop floating as soon as there is any interaction with draggable divs from user such as dragging/clicking
You can use position
method (A method of LeaderLine, Not PlainDraggable) to update drawn lines for new layout by elements that were moved by your script.
Is there any way to add transition to position method?
When I control position in the way you described it seems to just jump to new position without any transition.
Also when using Anim event i keep getting an error in the console
Can you confirm that this is the script that I need to use? https://cdn.jsdelivr.net/gh/anseki/anim-event/src/anim-event.js
Do you mean that you want to update the position of element that is moved by CSS transitions?
If so, you can use TransitionEvent
to handle events.
For example: https://jsfiddle.net/jwdyr9uo/
Note that this is TransitionEvent
of DOM and CSS. It is not PlainDraggable, and it is not LeaderLine also.
No reply came, then this abandoned issue is closed.
Hey there, a question I got from clients is if we can make these divs sort of float on load. What'd be the best approach to do this?
It should look simmilar to this but the issue I'm getting to is that it is hard to make the lines follow the divs https://www.loom.com/share/669f27aaec694229a3d185b1ba0156e4
I was wondering if you have an option to do something on load before draggables are dragged for the first time and stop it after that?