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

Need to unify grid, acnhor and path snapping #121

Closed
taye opened this issue Dec 6, 2014 · 1 comment
Closed

Need to unify grid, acnhor and path snapping #121

taye opened this issue Dec 6, 2014 · 1 comment

Comments

@taye
Copy link
Owner

taye commented Dec 6, 2014

Use a targets array which contains coordinate objects and functions. Grids would have to be created with an interact.createSnapGrid(gridXY) function;

interact(target).draggable({
  snap: {
    targets: [
      { x: 200, y: 200, range: 50 },

      function (x, y) {
        return { x: x % 20, y: y };
      },

      interact.createSnapGrid({
        x: 100, y: 100,
        offset: { x: 50, y: 50 }
      })
    ]
  }
});
@taye
Copy link
Owner Author

taye commented Dec 28, 2014

Closed in #127

@taye taye closed this as completed Dec 28, 2014
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

1 participant