diff options
author | Alexander Schmitz <arschmitz@gmail.com> | 2016-03-31 00:31:28 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2016-04-13 11:32:08 -0400 |
commit | f53d6ae970fc06a42f08639ba1b8b77f2a5ea91f (patch) | |
tree | 40f365aa99939bf9451666ce3bd0bd28cb73b560 /ui | |
parent | 5f41f9c6a8b143392452c5860c1dbc38cc3e31a4 (diff) | |
download | jquery-ui-f53d6ae970fc06a42f08639ba1b8b77f2a5ea91f.tar.gz jquery-ui-f53d6ae970fc06a42f08639ba1b8b77f2a5ea91f.zip |
Effect: Fix line length issues
Ref gh-1690
Diffstat (limited to 'ui')
-rw-r--r-- | ui/effect.js | 47 |
1 files changed, 30 insertions, 17 deletions
diff --git a/ui/effect.js b/ui/effect.js index 1a660fa49..5fb4ee579 100644 --- a/ui/effect.js +++ b/ui/effect.js @@ -49,7 +49,8 @@ $.effects = { */ ( function( jQuery, undefined ) { - var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor", + var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor " + + "borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor", // Plusequals test for += 100 -= 100 rplusequals = /^([\-+])=\s*(\d+\.?\d*)/, @@ -316,7 +317,8 @@ color.fn = jQuery.extend( color.prototype, { } ); // Everything defined but alpha? - if ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) { + if ( inst[ cache ] && + jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) { // Use the default of 1 inst[ cache ][ 3 ] = 1; @@ -624,7 +626,8 @@ color.hook = function( hook ) { var parsed, curElem, backgroundColor = ""; - if ( value !== "transparent" && ( jQuery.type( value ) !== "string" || ( parsed = stringParse( value ) ) ) ) { + if ( value !== "transparent" && ( jQuery.type( value ) !== "string" || + ( parsed = stringParse( value ) ) ) ) { value = color( parsed || value ); if ( !support.rgba && value._rgba[ 3 ] !== 1 ) { curElem = hook === "backgroundColor" ? elem.parentNode : elem; @@ -650,7 +653,8 @@ color.hook = function( hook ) { elem.style[ hook ] = value; } catch ( e ) { - // Wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit' + // Wrapped to prevent IE from throwing errors on "invalid" values like + // 'auto' or 'inherit' } } }; @@ -728,14 +732,17 @@ var classAnimationActions = [ "add", "remove", "toggle" ], padding: 1 }; -$.each( [ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], function( _, prop ) { - $.fx.step[ prop ] = function( fx ) { - if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) { - jQuery.style( fx.elem, prop, fx.end ); - fx.setAttr = true; - } - }; -} ); +$.each( + [ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], + function( _, prop ) { + $.fx.step[ prop ] = function( fx ) { + if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) { + jQuery.style( fx.elem, prop, fx.end ); + fx.setAttr = true; + } + }; + } +); function getElementStyles( elem ) { var key, len, @@ -1009,7 +1016,9 @@ if ( $.uiBackCompat !== false ) { $( active ).trigger( "focus" ); } - wrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually lose the reference to the wrapped element + // Hotfix for jQuery 1.4 since some change in wrap() seems to actually + // lose the reference to the wrapped element + wrapper = element.parent(); // Transfer positioning properties to the wrapper if ( element.css( "position" ) === "static" ) { @@ -1198,7 +1207,9 @@ $.extend( $.effects, { // Convert inline to inline block to account for inline elements // that turn to inline block based on content (like img) - display: /^(inline|ruby)/.test( element.css( "display" ) ) ? "inline-block" : "block", + display: /^(inline|ruby)/.test( element.css( "display" ) ) ? + "inline-block" : + "block", visibility: "hidden", // Margins need to be set to account for margin collapse @@ -1490,9 +1501,11 @@ $.fn.extend( { }, cssClip: function( clipObj ) { - return clipObj ? - this.css( "clip", "rect(" + clipObj.top + "px " + clipObj.right + "px " + clipObj.bottom + "px " + clipObj.left + "px)" ) : - parseClip( this.css( "clip" ), this ); + if ( clipObj ) { + return this.css( "clip", "rect(" + clipObj.top + "px " + clipObj.right + "px " + + clipObj.bottom + "px " + clipObj.left + "px)" ); + } + return parseClip( this.css( "clip" ), this ); }, transfer: function( options, done ) { |