Skip to content

Commit e8c87cc

Browse files
committed
Merge pull request #1 from RJMetrics/fix/resize-bias
Fixes the bias towards getting larger when resizing.
2 parents 7b3aead + ca16af3 commit e8c87cc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/angular-gridster.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1157,10 +1157,10 @@
11571157
oldSizeX = item.sizeX,
11581158
oldSizeY = item.sizeY,
11591159
hasCallback = gridster.resizable && gridster.resizable.resize;
1160-
item.row = gridster.pixelsToRows(elmY, false);
1161-
item.col = gridster.pixelsToColumns(elmX, false);
1162-
item.sizeX = gridster.pixelsToColumns(elmW, true);
1163-
item.sizeY = gridster.pixelsToRows(elmH, true);
1160+
item.row = gridster.pixelsToRows(elmY);
1161+
item.col = gridster.pixelsToColumns(elmX);
1162+
item.sizeX = gridster.pixelsToColumns(elmW);
1163+
item.sizeY = gridster.pixelsToRows(elmH);
11641164

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

0 commit comments

Comments
 (0)