From: Scott González Date: Fri, 20 Apr 2012 14:10:02 +0000 (-0400) Subject: Position: Simplify border calculations for feedback. X-Git-Tag: 1.9.0m8~87^2~7 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a9f1ffb4fd9b6953318e262b056c3a534a83e462;p=jquery-ui.git Position: Simplify border calculations for feedback. --- diff --git a/ui/jquery.ui.position.js b/ui/jquery.ui.position.js index 8f5601c28..31920c161 100644 --- a/ui/jquery.ui.position.js +++ b/ui/jquery.ui.position.js @@ -236,9 +236,9 @@ $.fn.position = function( options ) { // adds feedback as second argument to using callback, if present using = function( props ) { var left = targetOffset.left - props.left, - right = (targetOffset.left + targetWidth) - (props.left + elemWidth), + right = left + targetWidth - elemWidth, top = targetOffset.top - props.top, - bottom = (targetOffset.top + targetHeight) - (props.top + elemHeight), + bottom = top + targetHeight - elemHeight, feedback = { target: { element: target,