Comments (7)
In Angular (not JS) you need to add it to scripts
, inside angular.json
file architect > build > options
, e.g.:
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.scss"
],
"scripts": [
"src/DragDropTouch.js"
]
from dragdroptouch.
Can't you just use a <script> element?
<script src='scripts/DragDropTouch.js"></script>from dragdroptouch.
With Angular CLI, I think dragdroptouch would have to be an NPM package. Bernardo, would you mind if I created an NPM package for it, or has it been done already?
Once the npm package has been created, then you would install the package, and reference it in polyfills.js
from dragdroptouch.
I would not mind at all, that would actually be great!
Thank you for your help!
from dragdroptouch.
It looks like it's already been published out there:
https://www.npmjs.com/package/drag-drop-touch-polyfill
from dragdroptouch.
Also a newer one:
https://www.npmjs.com/package/drag-drop-touch
from dragdroptouch.
As it is a polyfill, I prefer to add it in polyfills.ts: import 'drag-drop-touch';
after npm install
ing, but I guess that's a matter of taste 😃
from dragdroptouch.
Related Issues (20)
- Drag-Drop-Touch-Polyfill not working with React Grid Layout library HOT 5
- NPM package outdated HOT 3
- Image is not draggable on Canvas. HOT 7
- Script breaks with this code HOT 2
- The returned event does not have offsetX and offsetY property HOT 5
- dblclick event triggered twice on touch screens HOT 1
- Internal selections is not working HOT 9
- How to drag&drop from window A to window B in Android? HOT 10
- Breaks Bootstrap 3 dropdown menu HOT 2
- Is it possible to make this a default behaviour on desktop as well?
- Enabling the polyfill only when draggable attribute is set HOT 1
- Demo page doesn't work, and uses a "dead" copy of wijmo
- Contributing changes HOT 8
- update the npm package HOT 3
- Set up github pages for the master branch HOT 10
- Playwright install in postinstall HOT 2
- Refine the demo page
- Should not start touch-dragging when source element has draggable="false" HOT 8
- tried to tweak the `options` of your new version, not working though HOT 30
- add DEBUG to the source HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dragdroptouch.