diff options
Diffstat (limited to 'ui/jquery.ui.position.js')
-rw-r--r-- | ui/jquery.ui.position.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/ui/jquery.ui.position.js b/ui/jquery.ui.position.js index 003e43c3f..cc0676370 100644 --- a/ui/jquery.ui.position.js +++ b/ui/jquery.ui.position.js @@ -226,14 +226,15 @@ $.fn.position = function( options ) { right = (targetOffset.left + targetWidth) - (props.left + elemWidth), top = targetOffset.top - props.top, bottom = (targetOffset.top + targetHeight) - (props.top + elemHeight); - props.horizontal = right < 0 ? "left" : left > 0 ? "right" : "center"; - props.vertical = bottom < 0 ? "top" : top > 0 ? "bottom" : "middle"; + var feedback = {}; + feedback.horizontal = right < 0 ? "left" : left > 0 ? "right" : "center"; + feedback.vertical = bottom < 0 ? "top" : top > 0 ? "bottom" : "middle"; if (Math.max(Math.abs(left), Math.abs(right)) > Math.max(Math.abs(top), Math.abs(bottom))) { - props.important = "horizontal"; + feedback.important = "horizontal"; } else { - props.important = "vertical"; + feedback.important = "vertical"; } - using.apply( this, arguments ); + using.call( this, props, feedback ); }; } elem.offset( $.extend( position, { using: options.using } ) ); |