From d0d937369c94d912be2f034500f9319318a44b0c Mon Sep 17 00:00:00 2001 From: Pedro Henrique Date: Thu, 16 Mar 2017 11:41:05 -0300 Subject: [PATCH] Update layout after layout complete and remove --- src/masonry.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/masonry.ts b/src/masonry.ts index 80c01a3..6e0d70e 100644 --- a/src/masonry.ts +++ b/src/masonry.ts @@ -64,9 +64,11 @@ export class AngularMasonry implements OnInit, OnDestroy { // Bind to events this._msnry.on('layoutComplete', (items: any) => { this.layoutComplete.emit(items); + this.layout(); }); this._msnry.on('removeComplete', (items: any) => { this.removeComplete.emit(items); + this.layout(); }); } @@ -127,4 +129,4 @@ export class AngularMasonry implements OnInit, OnDestroy { // console.log('AngularMasonry:', 'Brick removed'); } -} \ No newline at end of file +}