jQueryUI droppable, stop propagation to overlapped sibling

前端 未结 9 922
忘了有多久
忘了有多久 2020-12-02 01:59

As you can see here: http://jsfiddle.net/rA4CB/6/

When I make the drop in the overlapped area it is received in both droppables, greedy doesn\'t work when the items

9条回答
  •  青春惊慌失措
    2020-12-02 02:21

    I find that using #invertedSpear's method will cause UI state change which is not desirable in some cases. Here is the code.

    var lastOpertion = new Date().getTime();
    
    drop: function (event, ui) {
            if (new Date().getTime() - lastOpertion < 100) return;
            lastOpertion = new Date().getTime();
            ....
    }
    

提交回复
热议问题