Permalink
Browse files

Resizable: correct width when grid approaches zero

Fixes #10590
  • Loading branch information...
mikesherov committed Jan 28, 2015
1 parent 337e411 commit 9493839f23b6ff71aacb9cb8fe8fde6c8d0ecd61
Showing with 3 additions and 3 deletions.
  1. +2 −2 tests/unit/resizable/resizable_options.js
  2. +1 −1 ui/resizable.js
@@ -310,12 +310,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() {
View
@@ -1170,7 +1170,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;
}

0 comments on commit 9493839

Please sign in to comment.