Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Resizable: Changed the way box size is determined when using a helper…
…. Fixed #6926 - Window doesn't change to size that helper shows when snapping to grid

(cherry picked from commit 002f9a2)
  • Loading branch information
georgemarshall authored and scottgonzalez committed Feb 2, 2011
1 parent d4e715f commit d6fa44a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ui/jquery.ui.resizable.js
Expand Up @@ -322,10 +322,10 @@ $.widget("ui.resizable", $.ui.mouse, {


if(this._helper) { if(this._helper) {
var pr = this._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName), 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, soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height,
soffsetw = ista ? 0 : self.sizeDiff.width; 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, 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; top = (parseInt(self.element.css('top'), 10) + (self.position.top - self.originalPosition.top)) || null;


Expand Down

0 comments on commit d6fa44a

Please sign in to comment.