Skip to content

Commit

Permalink
Fixed #9744 - Galleria: thumbnail items doesn't work properly when re…
Browse files Browse the repository at this point in the history
…sponsive options are set
  • Loading branch information
yigitfindikli committed Mar 16, 2021
1 parent baa9e5b commit c296f36
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/components/galleria/galleria.ts
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,6 @@ export class GalleriaThumbnails implements OnInit, AfterContentChecked, OnDestro

ngOnInit() {
this.createStyle();
this.calculatePosition();

if (this.responsiveOptions) {
this.bindDocumentListeners();
Expand Down Expand Up @@ -620,6 +619,10 @@ export class GalleriaThumbnails implements OnInit, AfterContentChecked, OnDestro
}
}

ngAfterViewInit() {
this.calculatePosition();
}

createStyle() {
if (!this.thumbnailsStyle) {
this.thumbnailsStyle = document.createElement('style');
Expand Down

0 comments on commit c296f36

Please sign in to comment.