DraggableEl
Browser Support
This lib uses transform-function, requestAnimationFrame. Their compatibilities are:
Chrome, Firefox, Safari, Edge15, IE10
Usage
demo
- download package
npm i --save draggable-el
- import with
require
or<script>
let DraggableEl =
or
- initialize/destroy instance
- initialize instance
let config = dragButton: document dragEl: documentlet instance1 = config
more about config
- destroy instance
instance1
- destroy all instances
instance1
Config
Warning
- If
rotate
is in yourtransform
or default mode is not good, setisLeftTop:true
in your config.
Other Shiny Libs
TODO
- support npm
- support browser
- add tests
- support mobile touch behavior
- add readme config
- avoid overwrite transform other values