mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Droppable: Adjust fit tolerance to allow dropping an element exactly the same size as the droppable area. Fixed #5689 - Droppable tolerance fit feature.
This commit is contained in:
parent
92b7722fff
commit
3f3f357171
4
ui/jquery.ui.droppable.js
vendored
4
ui/jquery.ui.droppable.js
vendored
@ -161,8 +161,8 @@ $.ui.intersect = function(draggable, droppable, toleranceMode) {
|
|||||||
|
|
||||||
switch (toleranceMode) {
|
switch (toleranceMode) {
|
||||||
case 'fit':
|
case 'fit':
|
||||||
return (l < x1 && x2 < r
|
return (l <= x1 && x2 <= r
|
||||||
&& t < y1 && y2 < b);
|
&& t <= y1 && y2 <= b);
|
||||||
break;
|
break;
|
||||||
case 'intersect':
|
case 'intersect':
|
||||||
return (l < x1 + (draggable.helperProportions.width / 2) // Right Half
|
return (l < x1 + (draggable.helperProportions.width / 2) // Right Half
|
||||||
|
Loading…
Reference in New Issue
Block a user