This addon brings mobile-drag-drop into your Ember applications to polyfill drag and drop events for mobile browsers.
- Ember.js v3.16 or above
- Ember CLI v2.13 or above
- Node.js v10 or above
ember install ember-drag-drop-polyfill
For versions of Ember CLI < 2.15,
ember install [email protected]
Configure what files are included in your build by modifying ember-cli-build.js
.
Example:
// ember-cli-build.js
var app = new EmberApp(defaults, {
// Add options here
"ember-drag-drop-polyfill": {
includeCSS: true,
includeIconsCss: false,
includeDebugCss: true
}
});
Pass configuration options through to mobile-drag-drop by modifying config/environment.js
.
Example:
// config/environment.js
var ENV = {
// ...
"ember-drag-drop-polyfill": {
// These options are passed through to mobile-drag-drop
mobileDragDrop: {
enableEnterLeave: true,
holdToDrag: 500, // Hold for 500ms until drag starts
},
// These options are used by ember-drag-drop-polyfill
customOptions: {
enableIOSHack: true, // Enable if targeting iOS Safari 10.x and higher, see https://github.com/timruffles/mobile-drag-drop/issues/77
includeScrollBehavior: true // Sets the 'dragImageTranslateOverride' option in mobile-drag-drop
}
},
// ...
};
See the Contributing guide for details.
This project is licensed under the MIT License.