Skip to content

Commit

Permalink
fixed rounding cellWidth twice
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Telschow committed Aug 4, 2016
1 parent 99653bd commit 0a6bd2c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions dist/gridstack.js
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@
var o = $(this);
self.grid.cleanNodes();
self.grid.beginUpdate(node);
cellWidth = Math.ceil(o.outerWidth() / o.attr('data-gs-width'));
cellWidth = o.outerWidth() / o.attr('data-gs-width');
var strictCellHeight = Math.ceil(o.outerHeight() / o.attr('data-gs-height'));
cellHeight = self.container.height() / parseInt(self.container.attr('data-gs-current-height'));
self.placeholder
Expand All @@ -1048,7 +1048,7 @@
node._beforeDragX = node.x;
node._beforeDragY = node.y;

el.resizable('option', 'minWidth', cellWidth * (node.minWidth || 1));
el.resizable('option', 'minWidth', Math.ceil(cellWidth) * (node.minWidth || 1));
el.resizable('option', 'minHeight', strictCellHeight * (node.minHeight || 1));

if (event.type == 'resizestart') {
Expand Down

0 comments on commit 0a6bd2c

Please sign in to comment.