]> source.dussan.org Git - jquery-ui.git/commitdiff
Resizable: Changed the way box size is determined when using a helper. Fixed #6926... 105/head
authorGeorge Marshall <echosx@gmail.com>
Wed, 2 Feb 2011 02:52:17 +0000 (18:52 -0800)
committerGeorge Marshall <echosx@gmail.com>
Wed, 2 Feb 2011 02:52:17 +0000 (18:52 -0800)
ui/jquery.ui.resizable.js

index 38d543d207231d2866aad0e43bd5f1812af06f7c..1e1706a9dfd6b8a822247d1b4cf36b99a3b53826 100644 (file)
@@ -322,10 +322,10 @@ $.widget("ui.resizable", $.ui.mouse, {
 
                if(this._helper) {
                        var pr = this._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName),
-                                               soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height,
-                                                       soffsetw = ista ? 0 : self.sizeDiff.width;
+                               soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height,
+                               soffsetw = ista ? 0 : self.sizeDiff.width;
 
-                       var s = { width: (self.size.width - soffsetw), height: (self.size.height - soffseth) },
+                       var s = { width: (self.helper.width()  - soffsetw), height: (self.helper.height() - soffseth) },
                                left = (parseInt(self.element.css('left'), 10) + (self.position.left - self.originalPosition.left)) || null,
                                top = (parseInt(self.element.css('top'), 10) + (self.position.top - self.originalPosition.top)) || null;