Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/clone/wp-inclu.../js/jquery/ui
File: effect-size.js
/*!
[0] Fix | Delete
* jQuery UI Effects Size 1.13.3
[1] Fix | Delete
* https://jqueryui.com
[2] Fix | Delete
*
[3] Fix | Delete
* Copyright OpenJS Foundation and other contributors
[4] Fix | Delete
* Released under the MIT license.
[5] Fix | Delete
* https://jquery.org/license
[6] Fix | Delete
*/
[7] Fix | Delete
[8] Fix | Delete
//>>label: Size Effect
[9] Fix | Delete
//>>group: Effects
[10] Fix | Delete
//>>description: Resize an element to a specified width and height.
[11] Fix | Delete
//>>docs: https://api.jqueryui.com/size-effect/
[12] Fix | Delete
//>>demos: https://jqueryui.com/effect/
[13] Fix | Delete
[14] Fix | Delete
( function( factory ) {
[15] Fix | Delete
"use strict";
[16] Fix | Delete
[17] Fix | Delete
if ( typeof define === "function" && define.amd ) {
[18] Fix | Delete
[19] Fix | Delete
// AMD. Register as an anonymous module.
[20] Fix | Delete
define( [
[21] Fix | Delete
"jquery",
[22] Fix | Delete
"../version",
[23] Fix | Delete
"../effect"
[24] Fix | Delete
], factory );
[25] Fix | Delete
} else {
[26] Fix | Delete
[27] Fix | Delete
// Browser globals
[28] Fix | Delete
factory( jQuery );
[29] Fix | Delete
}
[30] Fix | Delete
} )( function( $ ) {
[31] Fix | Delete
"use strict";
[32] Fix | Delete
[33] Fix | Delete
return $.effects.define( "size", function( options, done ) {
[34] Fix | Delete
[35] Fix | Delete
// Create element
[36] Fix | Delete
var baseline, factor, temp,
[37] Fix | Delete
element = $( this ),
[38] Fix | Delete
[39] Fix | Delete
// Copy for children
[40] Fix | Delete
cProps = [ "fontSize" ],
[41] Fix | Delete
vProps = [ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ],
[42] Fix | Delete
hProps = [ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ],
[43] Fix | Delete
[44] Fix | Delete
// Set options
[45] Fix | Delete
mode = options.mode,
[46] Fix | Delete
restore = mode !== "effect",
[47] Fix | Delete
scale = options.scale || "both",
[48] Fix | Delete
origin = options.origin || [ "middle", "center" ],
[49] Fix | Delete
position = element.css( "position" ),
[50] Fix | Delete
pos = element.position(),
[51] Fix | Delete
original = $.effects.scaledDimensions( element ),
[52] Fix | Delete
from = options.from || original,
[53] Fix | Delete
to = options.to || $.effects.scaledDimensions( element, 0 );
[54] Fix | Delete
[55] Fix | Delete
$.effects.createPlaceholder( element );
[56] Fix | Delete
[57] Fix | Delete
if ( mode === "show" ) {
[58] Fix | Delete
temp = from;
[59] Fix | Delete
from = to;
[60] Fix | Delete
to = temp;
[61] Fix | Delete
}
[62] Fix | Delete
[63] Fix | Delete
// Set scaling factor
[64] Fix | Delete
factor = {
[65] Fix | Delete
from: {
[66] Fix | Delete
y: from.height / original.height,
[67] Fix | Delete
x: from.width / original.width
[68] Fix | Delete
},
[69] Fix | Delete
to: {
[70] Fix | Delete
y: to.height / original.height,
[71] Fix | Delete
x: to.width / original.width
[72] Fix | Delete
}
[73] Fix | Delete
};
[74] Fix | Delete
[75] Fix | Delete
// Scale the css box
[76] Fix | Delete
if ( scale === "box" || scale === "both" ) {
[77] Fix | Delete
[78] Fix | Delete
// Vertical props scaling
[79] Fix | Delete
if ( factor.from.y !== factor.to.y ) {
[80] Fix | Delete
from = $.effects.setTransition( element, vProps, factor.from.y, from );
[81] Fix | Delete
to = $.effects.setTransition( element, vProps, factor.to.y, to );
[82] Fix | Delete
}
[83] Fix | Delete
[84] Fix | Delete
// Horizontal props scaling
[85] Fix | Delete
if ( factor.from.x !== factor.to.x ) {
[86] Fix | Delete
from = $.effects.setTransition( element, hProps, factor.from.x, from );
[87] Fix | Delete
to = $.effects.setTransition( element, hProps, factor.to.x, to );
[88] Fix | Delete
}
[89] Fix | Delete
}
[90] Fix | Delete
[91] Fix | Delete
// Scale the content
[92] Fix | Delete
if ( scale === "content" || scale === "both" ) {
[93] Fix | Delete
[94] Fix | Delete
// Vertical props scaling
[95] Fix | Delete
if ( factor.from.y !== factor.to.y ) {
[96] Fix | Delete
from = $.effects.setTransition( element, cProps, factor.from.y, from );
[97] Fix | Delete
to = $.effects.setTransition( element, cProps, factor.to.y, to );
[98] Fix | Delete
}
[99] Fix | Delete
}
[100] Fix | Delete
[101] Fix | Delete
// Adjust the position properties based on the provided origin points
[102] Fix | Delete
if ( origin ) {
[103] Fix | Delete
baseline = $.effects.getBaseline( origin, original );
[104] Fix | Delete
from.top = ( original.outerHeight - from.outerHeight ) * baseline.y + pos.top;
[105] Fix | Delete
from.left = ( original.outerWidth - from.outerWidth ) * baseline.x + pos.left;
[106] Fix | Delete
to.top = ( original.outerHeight - to.outerHeight ) * baseline.y + pos.top;
[107] Fix | Delete
to.left = ( original.outerWidth - to.outerWidth ) * baseline.x + pos.left;
[108] Fix | Delete
}
[109] Fix | Delete
delete from.outerHeight;
[110] Fix | Delete
delete from.outerWidth;
[111] Fix | Delete
element.css( from );
[112] Fix | Delete
[113] Fix | Delete
// Animate the children if desired
[114] Fix | Delete
if ( scale === "content" || scale === "both" ) {
[115] Fix | Delete
[116] Fix | Delete
vProps = vProps.concat( [ "marginTop", "marginBottom" ] ).concat( cProps );
[117] Fix | Delete
hProps = hProps.concat( [ "marginLeft", "marginRight" ] );
[118] Fix | Delete
[119] Fix | Delete
// Only animate children with width attributes specified
[120] Fix | Delete
// TODO: is this right? should we include anything with css width specified as well
[121] Fix | Delete
element.find( "*[width]" ).each( function() {
[122] Fix | Delete
var child = $( this ),
[123] Fix | Delete
childOriginal = $.effects.scaledDimensions( child ),
[124] Fix | Delete
childFrom = {
[125] Fix | Delete
height: childOriginal.height * factor.from.y,
[126] Fix | Delete
width: childOriginal.width * factor.from.x,
[127] Fix | Delete
outerHeight: childOriginal.outerHeight * factor.from.y,
[128] Fix | Delete
outerWidth: childOriginal.outerWidth * factor.from.x
[129] Fix | Delete
},
[130] Fix | Delete
childTo = {
[131] Fix | Delete
height: childOriginal.height * factor.to.y,
[132] Fix | Delete
width: childOriginal.width * factor.to.x,
[133] Fix | Delete
outerHeight: childOriginal.height * factor.to.y,
[134] Fix | Delete
outerWidth: childOriginal.width * factor.to.x
[135] Fix | Delete
};
[136] Fix | Delete
[137] Fix | Delete
// Vertical props scaling
[138] Fix | Delete
if ( factor.from.y !== factor.to.y ) {
[139] Fix | Delete
childFrom = $.effects.setTransition( child, vProps, factor.from.y, childFrom );
[140] Fix | Delete
childTo = $.effects.setTransition( child, vProps, factor.to.y, childTo );
[141] Fix | Delete
}
[142] Fix | Delete
[143] Fix | Delete
// Horizontal props scaling
[144] Fix | Delete
if ( factor.from.x !== factor.to.x ) {
[145] Fix | Delete
childFrom = $.effects.setTransition( child, hProps, factor.from.x, childFrom );
[146] Fix | Delete
childTo = $.effects.setTransition( child, hProps, factor.to.x, childTo );
[147] Fix | Delete
}
[148] Fix | Delete
[149] Fix | Delete
if ( restore ) {
[150] Fix | Delete
$.effects.saveStyle( child );
[151] Fix | Delete
}
[152] Fix | Delete
[153] Fix | Delete
// Animate children
[154] Fix | Delete
child.css( childFrom );
[155] Fix | Delete
child.animate( childTo, options.duration, options.easing, function() {
[156] Fix | Delete
[157] Fix | Delete
// Restore children
[158] Fix | Delete
if ( restore ) {
[159] Fix | Delete
$.effects.restoreStyle( child );
[160] Fix | Delete
}
[161] Fix | Delete
} );
[162] Fix | Delete
} );
[163] Fix | Delete
}
[164] Fix | Delete
[165] Fix | Delete
// Animate
[166] Fix | Delete
element.animate( to, {
[167] Fix | Delete
queue: false,
[168] Fix | Delete
duration: options.duration,
[169] Fix | Delete
easing: options.easing,
[170] Fix | Delete
complete: function() {
[171] Fix | Delete
[172] Fix | Delete
var offset = element.offset();
[173] Fix | Delete
[174] Fix | Delete
if ( to.opacity === 0 ) {
[175] Fix | Delete
element.css( "opacity", from.opacity );
[176] Fix | Delete
}
[177] Fix | Delete
[178] Fix | Delete
if ( !restore ) {
[179] Fix | Delete
element
[180] Fix | Delete
.css( "position", position === "static" ? "relative" : position )
[181] Fix | Delete
.offset( offset );
[182] Fix | Delete
[183] Fix | Delete
// Need to save style here so that automatic style restoration
[184] Fix | Delete
// doesn't restore to the original styles from before the animation.
[185] Fix | Delete
$.effects.saveStyle( element );
[186] Fix | Delete
}
[187] Fix | Delete
[188] Fix | Delete
done();
[189] Fix | Delete
}
[190] Fix | Delete
} );
[191] Fix | Delete
[192] Fix | Delete
} );
[193] Fix | Delete
[194] Fix | Delete
} );
[195] Fix | Delete
[196] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function