]> source.dussan.org Git - jquery-ui.git/commitdiff
Resizable: Fix top jump with rotated element
authorFrancesc Baeta <francesc.baeta@gmail.com>
Thu, 24 Mar 2016 15:28:15 +0000 (16:28 +0100)
committerScott González <scott.gonzalez@gmail.com>
Wed, 30 Mar 2016 13:24:03 +0000 (09:24 -0400)
Fix top jump when resizing a rotated element (90°) using north handle
and exceeding the minmal height (default 10px).

Bug was found using a resizable-rotation-patch:
https://github.com/unlocomqx/jQuery-ui-resizable-rotation-patch

Closes gh-1687

ui/widgets/resizable.js

index 88ad41180643b64d82d58e25e17a7e14f480bb9c..e516c547ff7af55170626e3241c7d7c96fc349d4 100644 (file)
@@ -582,7 +582,7 @@ $.widget( "ui.resizable", $.ui.mouse, {
                        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.position.top + this.size.height,
+                       dh = this.originalPosition.top + this.originalSize.height,
                        cw = /sw|nw|w/.test( a ), ch = /nw|ne|n/.test( a );
                if ( isminw ) {
                        data.width = o.minWidth;