interact.js icon indicating copy to clipboard operation
interact.js copied to clipboard

How to implement elements snapping to each other functionality?

Open razmatinyan opened this issue 1 year ago • 1 comments

Hello. Does anyone know how to implement the elements snapping to each other functionality in 1.10.20 version? Didn't find any solution.

razmatinyan avatar Nov 13 '23 13:11 razmatinyan

@razmatinyan Look at this fiddle: https://jsfiddle.net/a0knv69j/9/

You just need to add in dynamicTargets the other elements x and y coordinates you want to snap to. I refresh it on every dragstart to the actual position of my other elements.

Daniel199438 avatar Dec 10 '23 10:12 Daniel199438