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

New Snap syntax not working

Open prajapati-mukesh opened this issue 1 year ago • 1 comments

Expected behavior

I used the snap modifier in the new version 1.10.26 of interact.js, but it's not working. Here's the code snippet:

interact('.draggable').draggable({
  modifiers: [
    interact.modifiers.snap({
      targets: [startPos],
      range: Infinity,
      relativePoints: [{ x: 0.5, y: 0.5 }],
      endOnly: true,
    }),
  ],
 });

https://codepen.io/mg-ghodela/pen/XWGVWJX?editors=0010

Actual behavior

https://codepen.io/mg-ghodela/pen/abMENOr?editors=1010

System configuration

interact.js version : 1.10.26: Chrome: Windows:

prajapati-mukesh avatar Jan 28 '24 16:01 prajapati-mukesh

It's not clear what should or shouldn't happen in the demo

taye avatar Mar 28 '24 10:03 taye