]> source.dussan.org Git - jquery-ui.git/commitdiff
Position: Simplify border calculations for feedback.
authorScott González <scott.gonzalez@gmail.com>
Fri, 20 Apr 2012 14:10:02 +0000 (10:10 -0400)
committerScott González <scott.gonzalez@gmail.com>
Fri, 20 Apr 2012 14:10:02 +0000 (10:10 -0400)
ui/jquery.ui.position.js

index 8f5601c28fd72b335e24bc486041ea063a5ab5ca..31920c16121bbe1902ab8030df685af4bbe84b69 100644 (file)
@@ -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,