Skip to content

Commit 002f9a2

Browse files
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
1 parent b3fcf17 commit 002f9a2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ui/jquery.ui.resizable.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -322,10 +322,10 @@ $.widget("ui.resizable", $.ui.mouse, {
322322

323323
if(this._helper) {
324324
var pr = this._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName),
325-
soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height,
326-
soffsetw = ista ? 0 : self.sizeDiff.width;
325+
soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height,
326+
soffsetw = ista ? 0 : self.sizeDiff.width;
327327

328-
var s = { width: (self.size.width - soffsetw), height: (self.size.height - soffseth) },
328+
var s = { width: (self.helper.width() - soffsetw), height: (self.helper.height() - soffseth) },
329329
left = (parseInt(self.element.css('left'), 10) + (self.position.left - self.originalPosition.left)) || null,
330330
top = (parseInt(self.element.css('top'), 10) + (self.position.top - self.originalPosition.top)) || null;
331331

0 commit comments

Comments
 (0)