Skip to content

Commit

Permalink
Merge pull request #1 from RJMetrics/fix/resize-bias
Browse files Browse the repository at this point in the history
Fixes the bias towards getting larger when resizing.
  • Loading branch information
b-ryan committed Dec 8, 2014
2 parents 7b3aead + ca16af3 commit e8c87cc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/angular-gridster.js
Original file line number Diff line number Diff line change
Expand Up @@ -1157,10 +1157,10 @@
oldSizeX = item.sizeX,
oldSizeY = item.sizeY,
hasCallback = gridster.resizable && gridster.resizable.resize;
item.row = gridster.pixelsToRows(elmY, false);
item.col = gridster.pixelsToColumns(elmX, false);
item.sizeX = gridster.pixelsToColumns(elmW, true);
item.sizeY = gridster.pixelsToRows(elmH, true);
item.row = gridster.pixelsToRows(elmY);
item.col = gridster.pixelsToColumns(elmX);
item.sizeX = gridster.pixelsToColumns(elmW);
item.sizeY = gridster.pixelsToRows(elmH);

if (
hasCallback || item.row !== oldRow || item.col !== oldCol || item.sizeX !== oldSizeX || item.sizeY !== oldSizeY
Expand Down

0 comments on commit e8c87cc

Please sign in to comment.