开发者

Large draggable item into small droppable container?

开发者 https://www.devze.com 2023-01-26 03:18 出处:网络
It works but it is a little problematic. When there are multiple small droppable areas near each other (15x15px) and I want to drop a 150x150px draggable item in a correct container, it is very diffic

It works but it is a little problematic. When there are multiple small droppable areas near each other (15x15px) and I want to drop a 150x150px draggable item in a correct container, it is very difficult to get it right.

Is there a way to make the draggable item drop at a current cursor pos开发者_运维问答ition?

I could then use cursorAt to specify the cursor to be outside the draggable item and it would be easy to "aim" it to correct droppable area.


I have found a way:

$('.drop').droppable({
  tolerance: 'pointer',
  drop: function() {
    //
  }
});
0

精彩评论

暂无评论...
验证码 换一张
取 消