2017-01-17 6 views
0

私はangular drag drop list libraryをリスト内の項目のドラッグ/ドロップに使用しています。現在、私はアイテムがページの本文全体にドラッグ可能であることを確認します。どのようにしてドラッグ領域を特定のゾーンに限定することができますか?私はAPIをチェックしましたが、そのためのオプションはありません。角度ドラッグドロップリストのドラッグ領域を制限する

答えて

0

あなたはdnd-draggable

<ul dnd-list="list"> 
    <!-- The dnd-draggable directive makes an element draggable and will 
     transfer the object that was assigned to it. If an element was 
     dragged away, you have to remove it from the original list 
     yourself using the dnd-moved attribute --> 
    <li ng-repeat="item in list" 
     dnd-draggable="item" 
     dnd-moved="list.splice($index, 1)" 
     dnd-effect-allowed="move" 
     dnd-selected="models.selected = item" 
     ng-class="{'selected': models.selected === item}" 
     > 
     {{item.label}} 
    </li> 
</ul> 
でのみhtml要素に、すべての場所にドラッグ&ドロップすることはできませんplunkerの例では、
関連する問題