SOURCE

console 命令行工具 X clear

                    
>
console
    window.interact('.drag-element').draggable({
      ignoreFrom: 'button, .widget-map',
      allowFrom: ''
    })
    .on('dragstart', function () {
      console.log('dragstart...')
    })
    .on('dragmove', function () {
      console.log('dragmove...')
    })
    .on('dragend', function () {
      console.log('dragend...')
    });
<div id="drag-container" style="border: 2px dashed #0000ff; height: 600px; margin: 0 auto; padding: 50px;">

  <div id="form-container" style="position: relative; border: 1px solid #0000ff; width: 100%; height: 100%;">

    <a class="drag-element-source drag-element" style="position: absolute; background-color: #fff; padding: 25px; border: 1px solid #ff0000;">
    <span class="inner-text">Drag this</span></a>

  </div>

</div>
.drag-element {
  -webkit-user-select: none;
   -khtml-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
}

本项目引用的自定义外部资源