diff options
Diffstat (limited to 'wp-includes/js/jquery/ui/resizable.js')
-rw-r--r-- | wp-includes/js/jquery/ui/resizable.js | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/wp-includes/js/jquery/ui/resizable.js b/wp-includes/js/jquery/ui/resizable.js index 2a5130a..3170bd1 100644 --- a/wp-includes/js/jquery/ui/resizable.js +++ b/wp-includes/js/jquery/ui/resizable.js @@ -1,17 +1,17 @@ /*! - * jQuery UI Resizable 1.13.2 - * http://jqueryui.com + * jQuery UI Resizable 1.13.3 + * https://jqueryui.com * - * Copyright jQuery Foundation and other contributors + * Copyright OpenJS Foundation and other contributors * Released under the MIT license. - * http://jquery.org/license + * https://jquery.org/license */ //>>label: Resizable //>>group: Interactions //>>description: Enables resize functionality for any element. -//>>docs: http://api.jqueryui.com/resizable/ -//>>demos: http://jqueryui.com/resizable/ +//>>docs: https://api.jqueryui.com/resizable/ +//>>demos: https://jqueryui.com/resizable/ //>>css.structure: ../../themes/base/core.css //>>css.structure: ../../themes/base/resizable.css //>>css.theme: ../../themes/base/theme.css @@ -25,7 +25,10 @@ define( [ "jquery", "./mouse", - "./core" + "../disable-selection", + "../plugin", + "../version", + "../widget" ], factory ); } else { @@ -36,7 +39,7 @@ "use strict"; $.widget( "ui.resizable", $.ui.mouse, { - version: "1.13.2", + version: "1.13.3", widgetEventPrefix: "resize", options: { alsoResize: false, @@ -530,15 +533,18 @@ $.widget( "ui.resizable", $.ui.mouse, { 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 ); } - this.helper.css( props ); - return props; }, @@ -1045,7 +1051,7 @@ $.ui.plugin.add( "resizable", "alsoResize", { $( o.alsoResize ).each( function() { var el = $( this ); el.data( "ui-resizable-alsoresize", { - width: parseFloat( el.width() ), height: parseFloat( el.height() ), + width: parseFloat( el.css( "width" ) ), height: parseFloat( el.css( "height" ) ), left: parseFloat( el.css( "left" ) ), top: parseFloat( el.css( "top" ) ) } ); } ); |