Skip to content

Commit

Permalink
Resizable: correct width when grid approaches zero
Browse files Browse the repository at this point in the history
Fixes #10590
(cherry picked from commit 9493839)
  • Loading branch information
mikesherov authored and scottgonzalez committed Feb 9, 2015
1 parent 105f4a5 commit 0a0db09
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/unit/resizable/resizable_options.js
Expand Up @@ -311,12 +311,12 @@ test( "grid - maintains grid with padding and border when approaching no dimensi
height: 80
}).resizable({
handles: "all",
grid: 50
grid: [ 50, 12 ]
});

TestHelpers.resizable.drag( handle, 50, 50 );
equal( target.outerWidth(), 50, "compare width" );
equal( target.outerHeight(), 50, "compare height" );
equal( target.outerHeight(), 52, "compare height" );
});

test("ui-resizable-se { handles: 'all', minWidth: 60, minHeight: 60, maxWidth: 100, maxHeight: 100 }", function() {
Expand Down
2 changes: 1 addition & 1 deletion ui/resizable.js
Expand Up @@ -1165,7 +1165,7 @@ $.ui.plugin.add("resizable", "grid", {
that.size.width = newWidth;
that.position.left = op.left - ox;
} else {
newWidth = gridY - outerDimensions.height;
newWidth = gridX - outerDimensions.width;
that.size.width = newWidth;
that.position.left = op.left + os.width - newWidth;
}
Expand Down

0 comments on commit 0a0db09

Please sign in to comment.