: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
$( "body" ).css( "cursor", "auto" );
this._removeClass( "ui-resizable-resizing" );
this._propagate( "stop", event );
_updatePrevProperties: function() {
_applyChanges: function() {
if ( this.position.top !== this.prevPosition.top ) {
props.top = this.position.top + "px";
if ( this.position.left !== this.prevPosition.left ) {
props.left = this.position.left + "px";
this.helper.css( props );
if ( this.size.width !== this.prevSize.width ) {
props.width = this.size.width + "px";
this.helper.width( props.width );
if ( this.size.height !== this.prevSize.height ) {
props.height = this.size.height + "px";
this.helper.height( props.height );
_updateVirtualBoundaries: function( forceAspectRatio ) {
var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b,
minWidth: this._isNumber( o.minWidth ) ? o.minWidth : 0,
maxWidth: this._isNumber( o.maxWidth ) ? o.maxWidth : Infinity,
minHeight: this._isNumber( o.minHeight ) ? o.minHeight : 0,
maxHeight: this._isNumber( o.maxHeight ) ? o.maxHeight : Infinity
if ( this._aspectRatio || forceAspectRatio ) {
pMinWidth = b.minHeight * this.aspectRatio;
pMinHeight = b.minWidth / this.aspectRatio;
pMaxWidth = b.maxHeight * this.aspectRatio;
pMaxHeight = b.maxWidth / this.aspectRatio;
if ( pMinWidth > b.minWidth ) {
if ( pMinHeight > b.minHeight ) {
b.minHeight = pMinHeight;
if ( pMaxWidth < b.maxWidth ) {
if ( pMaxHeight < b.maxHeight ) {
b.maxHeight = pMaxHeight;
_updateCache: function( data ) {
this.offset = this.helper.offset();
if ( this._isNumber( data.left ) ) {
this.position.left = data.left;
if ( this._isNumber( data.top ) ) {
this.position.top = data.top;
if ( this._isNumber( data.height ) ) {
this.size.height = data.height;
if ( this._isNumber( data.width ) ) {
this.size.width = data.width;
_updateRatio: function( data ) {
var cpos = this.position,
if ( this._isNumber( data.height ) ) {
data.width = ( data.height * this.aspectRatio );
} else if ( this._isNumber( data.width ) ) {
data.height = ( data.width / this.aspectRatio );
data.left = cpos.left + ( csize.width - data.width );
data.top = cpos.top + ( csize.height - data.height );
data.left = cpos.left + ( csize.width - data.width );
_respectSize: function( data ) {
var o = this._vBoundaries,
ismaxw = this._isNumber( data.width ) && o.maxWidth && ( o.maxWidth < data.width ),
ismaxh = this._isNumber( data.height ) && o.maxHeight && ( o.maxHeight < data.height ),
isminw = this._isNumber( data.width ) && o.minWidth && ( o.minWidth > data.width ),
isminh = this._isNumber( data.height ) && o.minHeight && ( o.minHeight > data.height ),
dw = this.originalPosition.left + this.originalSize.width,
dh = this.originalPosition.top + this.originalSize.height,
cw = /sw|nw|w/.test( a ), ch = /nw|ne|n/.test( a );
data.height = o.minHeight;
data.height = o.maxHeight;
data.left = dw - o.minWidth;
data.left = dw - o.maxWidth;
data.top = dh - o.minHeight;
data.top = dh - o.maxHeight;
// Fixing jump error on top/left - bug #2330
if ( !data.width && !data.height && !data.left && data.top ) {
} else if ( !data.width && !data.height && !data.top && data.left ) {
_getPaddingPlusBorderDimensions: function( element ) {
element.css( "borderTopWidth" ),
element.css( "borderRightWidth" ),
element.css( "borderBottomWidth" ),
element.css( "borderLeftWidth" )
element.css( "paddingTop" ),
element.css( "paddingRight" ),
element.css( "paddingBottom" ),
element.css( "paddingLeft" )
widths[ i ] = ( parseFloat( borders[ i ] ) || 0 );
widths[ i ] += ( parseFloat( paddings[ i ] ) || 0 );
height: widths[ 0 ] + widths[ 2 ],
width: widths[ 1 ] + widths[ 3 ]
_proportionallyResize: function() {
if ( !this._proportionallyResizeElements.length ) {
element = this.helper || this.element;
for ( ; i < this._proportionallyResizeElements.length; i++ ) {
prel = this._proportionallyResizeElements[ i ];
// TODO: Seems like a bug to cache this.outerDimensions
// considering that we are in a loop.
if ( !this.outerDimensions ) {
this.outerDimensions = this._getPaddingPlusBorderDimensions( prel );
height: ( element.height() - this.outerDimensions.height ) || 0,
width: ( element.width() - this.outerDimensions.width ) || 0
_renderProxy: function() {
var el = this.element, o = this.options;
this.elementOffset = el.offset();
this.helper = this.helper || $( "<div></div>" ).css( { overflow: "hidden" } );
this._addClass( this.helper, this._helper );
width: this.element.outerWidth(),
height: this.element.outerHeight(),
left: this.elementOffset.left + "px",
top: this.elementOffset.top + "px",
zIndex: ++o.zIndex //TODO: Don't modify option
this.helper = this.element;
e: function( event, dx ) {
return { width: this.originalSize.width + dx };
w: function( event, dx ) {
var cs = this.originalSize, sp = this.originalPosition;
return { left: sp.left + dx, width: cs.width - dx };
n: function( event, dx, dy ) {
var cs = this.originalSize, sp = this.originalPosition;
return { top: sp.top + dy, height: cs.height - dy };
s: function( event, dx, dy ) {
return { height: this.originalSize.height + dy };
se: function( event, dx, dy ) {
return $.extend( this._change.s.apply( this, arguments ),
this._change.e.apply( this, [ event, dx, dy ] ) );
sw: function( event, dx, dy ) {
return $.extend( this._change.s.apply( this, arguments ),
this._change.w.apply( this, [ event, dx, dy ] ) );
ne: function( event, dx, dy ) {
return $.extend( this._change.n.apply( this, arguments ),
this._change.e.apply( this, [ event, dx, dy ] ) );
nw: function( event, dx, dy ) {
return $.extend( this._change.n.apply( this, arguments ),
this._change.w.apply( this, [ event, dx, dy ] ) );
_propagate: function( n, event ) {
$.ui.plugin.call( this, n, [ event, this.ui() ] );
this._trigger( n, event, this.ui() );
originalElement: this.originalElement,
originalSize: this.originalSize,
originalPosition: this.originalPosition
$.ui.plugin.add( "resizable", "animate", {
stop: function( event ) {
var that = $( this ).resizable( "instance" ),
pr = that._proportionallyResizeElements,
ista = pr.length && ( /textarea/i ).test( pr[ 0 ].nodeName ),
soffseth = ista && that._hasScroll( pr[ 0 ], "left" ) ? 0 : that.sizeDiff.height,
soffsetw = ista ? 0 : that.sizeDiff.width,
width: ( that.size.width - soffsetw ),
height: ( that.size.height - soffseth )
left = ( parseFloat( that.element.css( "left" ) ) +
( that.position.left - that.originalPosition.left ) ) || null,
top = ( parseFloat( that.element.css( "top" ) ) +
( that.position.top - that.originalPosition.top ) ) || null;
$.extend( style, top && left ? { top: top, left: left } : {} ), {
duration: o.animateDuration,
width: parseFloat( that.element.css( "width" ) ),
height: parseFloat( that.element.css( "height" ) ),
top: parseFloat( that.element.css( "top" ) ),
left: parseFloat( that.element.css( "left" ) )
$( pr[ 0 ] ).css( { width: data.width, height: data.height } );
// Propagating resize, and updating values for each animation step
that._updateCache( data );
that._propagate( "resize", event );
$.ui.plugin.add( "resizable", "containment", {
var element, p, co, ch, cw, width, height,
that = $( this ).resizable( "instance" ),
ce = ( oc instanceof $ ) ?
( /parent/.test( oc ) ) ? el.parent().get( 0 ) : oc;
that.containerElement = $( ce );
if ( /document/.test( oc ) || oc === document ) {
that.containerPosition = {
width: $( document ).width(),
height: $( document ).height() || document.body.parentNode.scrollHeight
$( [ "Top", "Right", "Left", "Bottom" ] ).each( function( i, name ) {
p[ i ] = that._num( element.css( "padding" + name ) );
that.containerOffset = element.offset();
that.containerPosition = element.position();
height: ( element.innerHeight() - p[ 3 ] ),
width: ( element.innerWidth() - p[ 1 ] )
co = that.containerOffset;
ch = that.containerSize.height;
cw = that.containerSize.width;
width = ( that._hasScroll( ce, "left" ) ? ce.scrollWidth : cw );
height = ( that._hasScroll( ce ) ? ce.scrollHeight : ch );
resize: function( event ) {
var woset, hoset, isParent, isOffsetRelative,
that = $( this ).resizable( "instance" ),
co = that.containerOffset,
pRatio = that._aspectRatio || event.shiftKey,
ce = that.containerElement,
if ( ce[ 0 ] !== document && ( /static/ ).test( ce.css( "position" ) ) ) {
if ( cp.left < ( that._helper ? co.left : 0 ) ) {
that.size.width = that.size.width +
( that.position.left - co.left ) :
( that.position.left - cop.left ) );
that.size.height = that.size.width / that.aspectRatio;
that.position.left = o.helper ? co.left : 0;
if ( cp.top < ( that._helper ? co.top : 0 ) ) {
that.size.height = that.size.height +
( that.position.top - co.top ) :
that.size.width = that.size.height * that.aspectRatio;
that.position.top = that._helper ? co.top : 0;
isParent = that.containerElement.get( 0 ) === that.element.parent().get( 0 );
isOffsetRelative = /relative|absolute/.test( that.containerElement.css( "position" ) );
if ( isParent && isOffsetRelative ) {
that.offset.left = that.parentData.left + that.position.left;
that.offset.top = that.parentData.top + that.position.top;
that.offset.left = that.element.offset().left;
that.offset.top = that.element.offset().top;
woset = Math.abs( that.sizeDiff.width +
that.offset.left - cop.left :
( that.offset.left - co.left ) ) );
hoset = Math.abs( that.sizeDiff.height +
that.offset.top - cop.top :
( that.offset.top - co.top ) ) );
if ( woset + that.size.width >= that.parentData.width ) {
that.size.width = that.parentData.width - woset;
that.size.height = that.size.width / that.aspectRatio;
if ( hoset + that.size.height >= that.parentData.height ) {