How to use the interactjs/src/index function in interactjs

To help you get started, we’ve selected a few interactjs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github beizhedenglong / reactablejs / src / index.js View on Github external
componentDidMount() {
      if (!this.node) {
        console.error(' you should apply getRef props in the dom element') // eslint-disable-line
        return
      }
      this.interactable = interact(this.node)
      options.forEach((option) => {
        if (option in this.props) {
          this.interactable[option](this.props[option])
        }
      })
      events.forEach((event) => {
        const handler = this.props[`on${event}`]
        if (typeof handler === 'function') {
          this.interactable
            .on(event.toLowerCase(), handler)
        }
      })
    }
    componentWillUnmount() {

interactjs

Drag and drop, resizing and multi-touch gestures with inertia and snapping for modern browsers (and also IE9+)

MIT
Latest version published 1 month ago

Package Health Score

81 / 100
Full package analysis