Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Snap syntax not working #1030

Open
prajapati-mukesh opened this issue Jan 28, 2024 · 1 comment
Open

New Snap syntax not working #1030

prajapati-mukesh opened this issue Jan 28, 2024 · 1 comment

Comments

@prajapati-mukesh
Copy link

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:

@taye
Copy link
Owner

taye commented Mar 28, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants