taye / interact.js

JavaScript drag and drop, resizing and multi-touch gestures with inertia and snapping for modern browsers (and also IE9+)

Home Page:http://interactjs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to implement elements snapping to each other functionality?

razmatinyan opened this issue · 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 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.