1.0.12 • Published 4 years ago

kaguya-draggable v1.0.12

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

A simple plugin make your html element draggable!

repertory

Demo

  • Install

NPM

$npm install kaguya-draggable

or

<script src="./../dist/draggable.js"></script>
  • API
keyvaluedescription
selector'.drag'the root node
axis'both'/'x'/'y'draggable axis
cursor'move'the cursor style of selector
userSelectbooleanuserSelect of element
callbackfunctionget the coordinate
    const drag = new Draggable({
        selector: '#drag',
        axis: 'both',
        userSelect: false,
        cursor: 'move',
        callback: (data) => {
            console.log(data);
        },
    });

or you can register nodelist by pass class or element selector

    const drag = new Draggable({
        selector: '.drag',
        axis: 'both',
        cursor: 'move',
    });

contribute is welcome, if you want to contribute code view CONTRIBUTING

1.0.12

4 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago