property canDrop

(r/w) bool canDrop;

Typ

Zugriff

This property sets and gets the drop flag. When we drag item A over item B, a DragEvent (with type dragOver) is fired on item B. If the canDrop property of this event is true, we will be able to drop item A on item B. Otherwise, we will see a forbidden cursor which indicates that we can not drop item A on item B.
<box on:dragOver="onDragOver();"/>

function onDragOver()
{
    var eventObj = shell.currentEvent;
    if (eventObj)
    {
        // prevent this box from being a drop target.
        eventObj.canDrop = false;
    }
}