1.0.1 • Published 5 years ago

draggable-mixin v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

draggable-mixin

This is a simple wrapper of the Hammer.js lib on your ember component.

Installation

ember install draggable-mixin

Usage

Just include this mixin to your component:

import DraggableMixin from 'draggable-mixin/mixins/draggable';

export default Component.extend(DraggableMixin, {});

panDirection - function to restrict directions. Should return directional constant. Directional constants are similar to Hammer's. maxDistance - numeric attribute that restricts drag distance. onPanEnvComplete - function evaluated on panstop. targetElement - DOM element to apply wrapper

There are also _beforeMove and _afterMove hooks to provide additional control over process.

Contributing

Installation

  • git clone <repository-url>
  • cd draggable-mixin
  • npm install

Linting

  • npm run lint:hbs
  • npm run lint:js
  • npm run lint:js -- --fix

Running tests

  • ember test – Runs the test suite on the current Ember version
  • ember test --server – Runs the test suite in "watch mode"
  • ember try:each – Runs the test suite against multiple Ember versions

Running the dummy application

For more information on using ember-cli, visit https://ember-cli.com/.

License

This project is licensed under the MIT License.

1.0.1

5 years ago

0.0.7

5 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago