drag-in-parent

drag element

Usage no npm install needed!

<script type="module">
  import dragInParent from 'https://cdn.skypack.dev/drag-in-parent';
</script>

README

Drag Element in the parent's range;

Installation

    npm install drag-in-parent -S

Usage

    <div id="parent">
        <div class="move"></div>
    </div>
    import Drag from 'drag-in-parent';
    const parent = document.getElementById('parent');
    const move = document.querySelector('.move');
    new Drag(move, parent);