Skip to content

Commit

Permalink
Constrain annotation image proportions to address #236. Bug fix for #235
Browse files Browse the repository at this point in the history
  • Loading branch information
gjcope committed Dec 13, 2023
1 parent 4d1e442 commit 03c8a0a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion source/client/annotations/CircleSprite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ class CircleAnnotation extends AnnotationElement
const annotationData = annotation.data;

return html`<div class="sv-title">${annotation.title}</div>
${annotationData.imageUri ? html`<div><img src="${this.sprite.assetManager.getAssetUrl(annotationData.imageUri)}"></div>` : null}
${annotationData.imageUri ? html`<div><img alt="${annotation.imageAltText}" src="${this.sprite.assetManager.getAssetUrl(annotationData.imageUri)}">${annotation.imageCredit ? html`<div class="sv-img-credit">${annotation.imageCredit}</div>` : null}</div>` : null}
<div class="sv-content"><p>${unsafeHTML(annotation.lead)}</p></div>
${annotationData.audioId ? html`<div id="audio_container" @pointerdown=${this.onClickAudio}></div>` : null}
${annotationData.articleId ? html`<ff-button inline text="Read more..." icon="document" @click=${this.onClickArticle}></ff-button>` : null}`;
Expand Down
1 change: 1 addition & 0 deletions source/client/ui/explorer/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ $pad: $canvas-border-width + $main-menu-button-size + 8px;

img {
max-height: 120px;
max-width: 100%;
}

.sv-img-credit {
Expand Down

0 comments on commit 03c8a0a

Please sign in to comment.