@interactjs/modifiers
Use modifiers to change the coordinates of drag, resize and gesture events.
Last updated 6 years ago by taye .
Original npm · Tarball · package.json
$ npm install @interactjs/modifiers 
SYNC missed versions from official npm registry.

modifiers

Use modifiers to change the coordinates of drag, resize and gesture events.

The options object passed to the action methods can have a modifiers array which will be applied to events of that action type.

// create a restrict modifier to prevent dragging an element out of its parent
const restrictToParent = interact.modifiers.restrict({
  restriction: 'parent',
  elementRect: { left: 0, right: 0, top: 1, bottom: 1 },
})

// create a snap modifier which changes the event coordinates to the closest
// corner of a grid
const snap100x100 = interact.modifiers.snap({
  targets: [interact.snappers.grid({ x: 100, y: 100 })],
}),

// apply the restrict and then the snap modifiers to drag events
interact(target).draggable({
  modifiers: [restrictToParent, snap100x100],
})

Modifers in the array are applied sequentially and the order may affect the result.

Current Tags

  • 1.10.27                                ...           latest (8 months ago)
  • 1.8.3                                ...           next (5 years ago)

136 Versions

  • 1.10.27                                ...           8 months ago
  • 1.10.26                                ...           a year ago
  • 1.10.25                                ...           a year ago
  • 1.10.24                                ...           a year ago
  • 1.10.23                                ...           a year ago
  • 1.10.22                                ...           a year ago
  • 1.10.21                                ...           a year ago
  • 1.10.20                                ...           a year ago
  • 1.10.19                                ...           a year ago
  • 1.10.18                                ...           a year ago
  • 1.10.17                                ...           2 years ago
  • 1.10.16                                ...           2 years ago
  • 1.10.15                                ...           2 years ago
  • 1.10.14                                ...           2 years ago
  • 1.10.13                                ...           2 years ago
  • 1.10.12                                ...           2 years ago
  • 1.10.11                                ...           4 years ago
  • 1.10.10                                ...           4 years ago
  • 1.10.9                                ...           4 years ago
  • 1.10.8                                ...           4 years ago
  • 1.10.7                                ...           4 years ago
  • 1.10.6                                ...           4 years ago
  • 1.10.5                                ...           4 years ago
  • 1.10.3                                ...           4 years ago
  • 1.10.2                                ...           4 years ago
  • 1.10.1                                ...           4 years ago
  • 1.10.0                                ...           4 years ago
  • 1.9.22                                ...           4 years ago
  • 1.9.21                                ...           4 years ago
  • 1.9.20                                ...           4 years ago
  • 1.9.19                                ...           4 years ago
  • 1.9.18                                ...           4 years ago
  • 1.9.17                                ...           4 years ago
  • 1.9.16                                ...           4 years ago
  • 1.9.15                                ...           4 years ago
  • 1.9.14                                ...           5 years ago
  • 1.9.13                                ...           5 years ago
  • 1.9.12                                ...           5 years ago
  • 1.9.11                                ...           5 years ago
  • 1.9.10                                ...           5 years ago
  • 1.9.9                                ...           5 years ago
  • 1.9.8                                ...           5 years ago
  • 1.9.7                                ...           5 years ago
  • 1.9.6                                ...           5 years ago
  • 1.9.5                                ...           5 years ago
  • 1.9.4                                ...           5 years ago
  • 1.9.3                                ...           5 years ago
  • 1.9.2                                ...           5 years ago
  • 1.9.1                                ...           5 years ago
  • 1.9.0                                ...           5 years ago
  • 1.8.5                                ...           5 years ago
  • 1.8.4                                ...           5 years ago
  • 1.8.3                                ...           5 years ago
  • 1.8.2                                ...           5 years ago
  • 1.8.1                                ...           5 years ago
  • 1.8.0                                ...           5 years ago
  • 1.8.0-rc.3                                ...           5 years ago
  • 1.8.0-rc.2                                ...           5 years ago
  • 1.8.0-rc.1                                ...           5 years ago
  • 1.8.0-rc.0                                ...           5 years ago
  • 1.8.0-alpha.7                                ...           5 years ago
  • 1.7.3                                ...           5 years ago
  • 1.8.0-alpha.6                                ...           5 years ago
  • 1.8.0-alpha.5                                ...           5 years ago
  • 1.8.0-alpha.4                                ...           5 years ago
  • 1.8.0-alpha.3                                ...           5 years ago
  • 1.8.0-alpha.2                                ...           5 years ago
  • 1.8.0-alpha.1                                ...           5 years ago
  • 1.7.2                                ...           5 years ago
  • 1.8.0-alpha.0                                ...           5 years ago
  • 1.7.1                                ...           5 years ago
  • 1.7.0                                ...           5 years ago
  • 1.6.3                                ...           5 years ago
  • 1.6.2                                ...           5 years ago
  • 1.6.1                                ...           5 years ago
  • 1.6.1-0                                ...           5 years ago
  • 1.6.0                                ...           5 years ago
  • 1.5.4                                ...           5 years ago
  • 1.5.3                                ...           5 years ago
  • 1.5.2                                ...           5 years ago
  • 1.5.1                                ...           5 years ago
  • 1.5.0                                ...           5 years ago
  • 1.4.14                                ...           5 years ago
  • 1.4.13                                ...           5 years ago
  • 1.4.12                                ...           5 years ago
  • 1.4.11                                ...           5 years ago
  • 1.4.10                                ...           5 years ago
  • 1.4.9                                ...           5 years ago
  • 1.4.8                                ...           5 years ago
  • 1.4.7                                ...           5 years ago
  • 1.4.6                                ...           5 years ago
  • 1.4.5                                ...           5 years ago
  • 1.4.4                                ...           5 years ago
  • 1.4.3                                ...           5 years ago
  • 1.4.2                                ...           5 years ago
  • 1.4.1                                ...           6 years ago
  • 1.4.0                                ...           6 years ago
  • 1.4.0-rc.13                                ...           6 years ago
  • 1.4.0-rc.12                                ...           6 years ago
  • 1.4.0-rc.11                                ...           6 years ago
  • 1.4.0-rc.10                                ...           6 years ago
  • 1.4.0-rc.9                                ...           6 years ago
  • 1.4.0-rc.8                                ...           6 years ago
  • 1.4.0-rc.7                                ...           6 years ago
  • 1.4.0-rc.6                                ...           6 years ago
  • 1.4.0-rc.5                                ...           6 years ago
  • 1.4.0-rc.4                                ...           6 years ago
  • 1.4.0-rc.3                                ...           6 years ago
  • 1.4.0-rc.2                                ...           6 years ago
  • 1.4.0-rc.1                                ...           6 years ago
  • 1.4.0-rc.0                                ...           6 years ago
  • 1.4.0-beta.4                                ...           6 years ago
  • 1.4.0-beta.3                                ...           6 years ago
  • 1.4.0-beta.2                                ...           6 years ago
  • 1.4.0-beta.1                                ...           6 years ago
  • 1.4.0-beta.0                                ...           6 years ago
  • 1.4.0-alpha.33                                ...           6 years ago
  • 1.4.0-alpha.32                                ...           6 years ago
  • 1.4.0-alpha.31                                ...           6 years ago
  • 1.4.0-alpha.30                                ...           6 years ago
  • 1.4.0-alpha.29                                ...           6 years ago
  • 1.4.0-alpha.28                                ...           6 years ago
  • 1.4.0-alpha.27                                ...           6 years ago
  • 1.4.0-alpha.26                                ...           6 years ago
  • 1.4.0-alpha.25                                ...           6 years ago
  • 1.4.0-alpha.24                                ...           6 years ago
  • 1.4.0-alpha.23                                ...           6 years ago
  • 1.4.0-alpha.22                                ...           6 years ago
  • 1.4.0-alpha.21                                ...           6 years ago
  • 1.4.0-alpha.20                                ...           6 years ago
  • 1.4.0-alpha.19                                ...           6 years ago
  • 1.4.0-alpha.18                                ...           6 years ago
  • 1.4.0-alpha.17                                ...           6 years ago
  • 1.4.0-alpha.16                                ...           6 years ago
  • 1.4.0-alpha.15                                ...           6 years ago
  • 1.4.0-alpha.14                                ...           6 years ago
Maintainers (2)
Downloads
Total 1
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (0)
None
Dev Dependencies (0)
None

© 2010 - cnpmjs.org x YWFE | Home | YWFE