jquery - How to drop larger object on a smaller one when near edge of the containment? -


i'm trying drop large box onto smaller box. large box seems 'over' box when center inside smaller box.

can change part of big box needs on smaller one?

why? because works fine until add containment. when small box near edge of containment center of large box can't 'inside' small 1 because hits edge of area.

not code show. like:

$(bigbox).draggable({     containment: $("#container") })  $(smallbox).droppable({      drop: dropped-function }) 

if understand correctly, want @ droppable method's options, tolerance. default intersect means big box has overlap small box @ least 50%. setting tolerance touch allow big box dropped on smaller box when overlaps smaller box amount.

i hope helps.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -