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

Per-action modifiers array #625

Merged
merged 16 commits into from
Jun 3, 2018
Merged

Per-action modifiers array #625

merged 16 commits into from
Jun 3, 2018

Conversation

taye
Copy link
Owner

@taye taye commented Apr 13, 2018

const restrictToParent = interact.modifiers.restrict({
  restriction: 'parent',
  elementRect: { left: 0, right: 0, top: 1, bottom: 1 },
})

const snap100x100 = interact.modifiers.snap({
  targets: [interact.snappers.grid({ x: 100, y: 100 })],
}),

interact(target).draggable({
  // apply the restriction, then the snap grid
  modifiers: [restrictToParent, snap100x100],
})
  • docs
  • tests

Close #208

@taye taye force-pushed the modifiers-array branch 3 times, most recently from dea031d to e03b74f Compare April 19, 2018 12:31
@taye taye force-pushed the modifiers-array branch from e03b74f to 7841b47 Compare May 17, 2018 12:33
@taye taye force-pushed the modifiers-array branch 3 times, most recently from 17a6889 to e6cf5d3 Compare May 30, 2018 22:54
@taye taye force-pushed the modifiers-array branch from e6cf5d3 to 003a376 Compare June 1, 2018 19:10
@taye taye force-pushed the modifiers-array branch from 003a376 to 6778e44 Compare June 1, 2018 19:13
@taye taye merged commit 2fd6390 into master Jun 3, 2018
@taye taye deleted the modifiers-array branch February 2, 2019 06:06
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

Successfully merging this pull request may close these issues.

1 participant