Closed lucaslgr closed 3 years ago
Hi @lucaslgr, thank you for the comment.
The NPM package is installed into node_modules
directory normally.
Therefore, you have to write this in the HTML file. (when the file exists at the same directory as the node_modules
directory.)
<script src="node_modules/plain-draggable/plain-draggable.min.js"></script>
See document: https://anseki.github.io/plain-draggable/#usage
Thanks a lot @anseki ! It's working for me, I thought that I could use :
const plainDraggrable = require('plain-draggable');
But I don't understand very much about Javascript for frontend development yet. You helped me a lot and your library is really wonderful!!
I'm trying to use it with the https://anseki.github.io/leader-line/ for make a academic project of my school
Could I ask you another question?
How I could make zoom in parent of draggable elements, a similar in what did you do in the first example of this page? https://anseki.github.io/plain-draggable/#options
Of course you can import it via require
also. The node_modules
is specification of Node.js and NPM, then you had better learn those.
Could you make new issue for another topic after closing this issue?
Of course, I'll make a new issue for another questions, Thanks a lot again @anseki !
Firstly thanks for the library, It's awesome!
I've tried to install using this command below:
and in file.js of my .html file I've tried to use the library in this way:
but it isn't working.
What is the best way to use it ?