Skip to content

Commit

Permalink
Potential fix for overlapping items, related to #5
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisameling committed Sep 10, 2020
1 parent 7104ffe commit 66f233b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions projects/muuri-angular/src/lib/muuri-grid-item.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@ export class MuuriGridItemDirective implements OnInit {

ngOnInit(): void {
this.tileGrid.addItem(this.elRef);
// Force refresh the grid to prevent overlapping items
this.tileGrid.refresh();
}
}
1 change: 0 additions & 1 deletion projects/muuri-angular/src/lib/muuri-grid.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export class MuuriGridDirective implements OnInit, OnDestroy {

refresh(): void {
this.layout.refreshItems();
this.layout.layout();
}

ngOnDestroy(): void {
Expand Down

0 comments on commit 66f233b

Please sign in to comment.