]> source.dussan.org Git - jquery-ui.git/commitdiff
Position: Fix line length issues
authorAlexander Schmitz <arschmitz@gmail.com>
Thu, 31 Mar 2016 04:09:19 +0000 (00:09 -0400)
committerScott González <scott.gonzalez@gmail.com>
Wed, 13 Apr 2016 15:32:01 +0000 (11:32 -0400)
Ref gh-1690

ui/position.js

index f8fa1b5dbe12629107c755b2c90fc2948a72077a..394105667bfc1e412717145d048f20dd9ca8514e 100644 (file)
@@ -105,7 +105,9 @@ $.position = {
                        return cachedScrollbarWidth;
                }
                var w1, w2,
-                       div = $( "<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" ),
+                       div = $( "<div " +
+                               "style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'>" +
+                               "<div style='height:100px;width:auto;'></div></div>" ),
                        innerDiv = div.children()[ 0 ];
 
                $( "body" ).append( div );
@@ -242,8 +244,10 @@ $.fn.position = function( options ) {
                        elemHeight = elem.outerHeight(),
                        marginLeft = parseCss( this, "marginLeft" ),
                        marginTop = parseCss( this, "marginTop" ),
-                       collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + scrollInfo.width,
-                       collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + scrollInfo.height,
+                       collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) +
+                               scrollInfo.width,
+                       collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) +
+                               scrollInfo.height,
                        position = $.extend( {}, basePosition ),
                        myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );
 
@@ -353,7 +357,8 @@ $.ui.position = {
 
                                // Element is initially over the left side of within
                                if ( overLeft > 0 && overRight <= 0 ) {
-                                       newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset;
+                                       newOverRight = position.left + overLeft + data.collisionWidth - outerWidth -
+                                               withinOffset;
                                        position.left += overLeft - newOverRight;
 
                                // Element is initially over right side of within
@@ -396,7 +401,8 @@ $.ui.position = {
 
                                // Element is initially over the top of within
                                if ( overTop > 0 && overBottom <= 0 ) {
-                                       newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset;
+                                       newOverBottom = position.top + overTop + data.collisionHeight - outerHeight -
+                                               withinOffset;
                                        position.top += overTop - newOverBottom;
 
                                // Element is initially over bottom of within
@@ -450,12 +456,14 @@ $.ui.position = {
                                newOverLeft;
 
                        if ( overLeft < 0 ) {
-                               newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset;
+                               newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth -
+                                       outerWidth - withinOffset;
                                if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {
                                        position.left += myOffset + atOffset + offset;
                                }
                        } else if ( overRight > 0 ) {
-                               newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft;
+                               newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset +
+                                       atOffset + offset - offsetLeft;
                                if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {
                                        position.left += myOffset + atOffset + offset;
                                }
@@ -484,12 +492,14 @@ $.ui.position = {
                                newOverTop,
                                newOverBottom;
                        if ( overTop < 0 ) {
-                               newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset;
+                               newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight -
+                                       outerHeight - withinOffset;
                                if ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) {
                                        position.top += myOffset + atOffset + offset;
                                }
                        } else if ( overBottom > 0 ) {
-                               newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;
+                               newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset +
+                                       offset - offsetTop;
                                if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) {
                                        position.top += myOffset + atOffset + offset;
                                }