mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Effect: Fix line length issues
Ref gh-1690
This commit is contained in:
parent
5f41f9c6a8
commit
f53d6ae970
47
ui/effect.js
47
ui/effect.js
@ -49,7 +49,8 @@ $.effects = {
|
|||||||
*/
|
*/
|
||||||
( function( jQuery, undefined ) {
|
( 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
|
// Plusequals test for += 100 -= 100
|
||||||
rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
|
rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
|
||||||
@ -316,7 +317,8 @@ color.fn = jQuery.extend( color.prototype, {
|
|||||||
} );
|
} );
|
||||||
|
|
||||||
// Everything defined but alpha?
|
// 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
|
// Use the default of 1
|
||||||
inst[ cache ][ 3 ] = 1;
|
inst[ cache ][ 3 ] = 1;
|
||||||
@ -624,7 +626,8 @@ color.hook = function( hook ) {
|
|||||||
var parsed, curElem,
|
var parsed, curElem,
|
||||||
backgroundColor = "";
|
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 );
|
value = color( parsed || value );
|
||||||
if ( !support.rgba && value._rgba[ 3 ] !== 1 ) {
|
if ( !support.rgba && value._rgba[ 3 ] !== 1 ) {
|
||||||
curElem = hook === "backgroundColor" ? elem.parentNode : elem;
|
curElem = hook === "backgroundColor" ? elem.parentNode : elem;
|
||||||
@ -650,7 +653,8 @@ color.hook = function( hook ) {
|
|||||||
elem.style[ hook ] = value;
|
elem.style[ hook ] = value;
|
||||||
} catch ( e ) {
|
} 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
|
padding: 1
|
||||||
};
|
};
|
||||||
|
|
||||||
$.each( [ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], function( _, prop ) {
|
$.each(
|
||||||
$.fx.step[ prop ] = function( fx ) {
|
[ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ],
|
||||||
if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) {
|
function( _, prop ) {
|
||||||
jQuery.style( fx.elem, prop, fx.end );
|
$.fx.step[ prop ] = function( fx ) {
|
||||||
fx.setAttr = true;
|
if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) {
|
||||||
}
|
jQuery.style( fx.elem, prop, fx.end );
|
||||||
};
|
fx.setAttr = true;
|
||||||
} );
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
function getElementStyles( elem ) {
|
function getElementStyles( elem ) {
|
||||||
var key, len,
|
var key, len,
|
||||||
@ -1009,7 +1016,9 @@ if ( $.uiBackCompat !== false ) {
|
|||||||
$( active ).trigger( "focus" );
|
$( 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
|
// Transfer positioning properties to the wrapper
|
||||||
if ( element.css( "position" ) === "static" ) {
|
if ( element.css( "position" ) === "static" ) {
|
||||||
@ -1198,7 +1207,9 @@ $.extend( $.effects, {
|
|||||||
|
|
||||||
// Convert inline to inline block to account for inline elements
|
// Convert inline to inline block to account for inline elements
|
||||||
// that turn to inline block based on content (like img)
|
// 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",
|
visibility: "hidden",
|
||||||
|
|
||||||
// Margins need to be set to account for margin collapse
|
// Margins need to be set to account for margin collapse
|
||||||
@ -1490,9 +1501,11 @@ $.fn.extend( {
|
|||||||
},
|
},
|
||||||
|
|
||||||
cssClip: function( clipObj ) {
|
cssClip: function( clipObj ) {
|
||||||
return clipObj ?
|
if ( clipObj ) {
|
||||||
this.css( "clip", "rect(" + clipObj.top + "px " + clipObj.right + "px " + clipObj.bottom + "px " + clipObj.left + "px)" ) :
|
return this.css( "clip", "rect(" + clipObj.top + "px " + clipObj.right + "px " +
|
||||||
parseClip( this.css( "clip" ), this );
|
clipObj.bottom + "px " + clipObj.left + "px)" );
|
||||||
|
}
|
||||||
|
return parseClip( this.css( "clip" ), this );
|
||||||
},
|
},
|
||||||
|
|
||||||
transfer: function( options, done ) {
|
transfer: function( options, done ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user