Skip to content

Commit

Permalink
Merge pull request #639 from geonetwork/fix-thumbnail-bg
Browse files Browse the repository at this point in the history
Datahub: Fix thumbnail background for org logos
  • Loading branch information
f-necas committed Oct 3, 2023
2 parents c12342b + 16564aa commit 7c8b49c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libs/ui/elements/src/lib/thumbnail/thumbnail.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ export class ThumbnailComponent implements OnInit, OnChanges {
imgUrl: string
imgFit: FitOptions
placeholderUrl = this.optionalPlaceholderUrl || DEFAULT_PLACEHOLDER
isPlaceholder = false
get isPlaceholder() {
return this.imgUrl === this.placeholderUrl
}
private images: ThumbnailImageObject[] = []

constructor(
Expand Down Expand Up @@ -77,7 +79,6 @@ export class ThumbnailComponent implements OnInit, OnChanges {
this.setPlaceholder()
return
}
this.isPlaceholder = false
this.setNewSrcImage(this.images[0])
}

Expand All @@ -87,7 +88,6 @@ export class ThumbnailComponent implements OnInit, OnChanges {
}

private setPlaceholder(): void {
this.isPlaceholder = true
this.setNewSrcImage({ url: this.placeholderUrl, fit: 'scale-down' })
}

Expand Down

0 comments on commit 7c8b49c

Please sign in to comment.