aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-04-20 10:10:02 -0400
committerScott González <scott.gonzalez@gmail.com>2012-04-20 10:10:02 -0400
commita9f1ffb4fd9b6953318e262b056c3a534a83e462 (patch)
tree387a38cd63cd74c15b8475873180c5f48a97edb2
parent3b73177d0c5e131d4825080efbd203b2449b2f0f (diff)
downloadjquery-ui-a9f1ffb4fd9b6953318e262b056c3a534a83e462.tar.gz
jquery-ui-a9f1ffb4fd9b6953318e262b056c3a534a83e462.zip
Position: Simplify border calculations for feedback.
-rw-r--r--ui/jquery.ui.position.js4
1 files changed, 2 insertions, 2 deletions
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,