1.0.12 • Published 5 years ago

kaguya-draggable v1.0.12

Weekly downloads
-
License
MIT
Repository
-
Last release
5 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

5 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago