Skip to content
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.

Commit

Permalink
Revert change to _removeFromGrid. Should fix #240 #242
Browse files Browse the repository at this point in the history
  • Loading branch information
BTMorton committed Jun 25, 2017
1 parent 23d799d commit e8fb109
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/directives/NgGrid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ export class NgGrid implements OnInit, DoCheck, OnDestroy {
this.isResizing = false;

var itemDims = this._resizingItem.getSize();

this._resizingItem.setSize(itemDims);
this._addToGrid(this._resizingItem);

Expand Down Expand Up @@ -829,7 +829,7 @@ export class NgGrid implements OnInit, DoCheck, OnDestroy {
}
break;
}

collisions[0].setGridPosition(itemPos);

this._fixGridCollisions(itemPos, itemDims);
Expand Down Expand Up @@ -1070,8 +1070,8 @@ export class NgGrid implements OnInit, DoCheck, OnDestroy {
}

private _removeFromGrid(item: NgGridItem): void {
for (let y: number = item.row; y < item.row + item.sizey; y++)
for (let x: number = item.col; x < item.col + item.sizex; x++)
for (let y in this._itemGrid)
for (let x in this._itemGrid[y])
if (this._itemGrid[y][x] == item)
delete this._itemGrid[y][x];
}
Expand Down

0 comments on commit e8fb109

Please sign in to comment.