fixed maximum height in image display

This commit is contained in:
Nicolas Constant 2019-07-11 19:37:43 -04:00
parent b93315092b
commit 03870964f4
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688
2 changed files with 5 additions and 4 deletions

View File

@ -16,9 +16,9 @@
</button> </button>
<div *ngFor="let att of attachments" class="media-viewer-canvas__attachement" <div *ngFor="let att of attachments" class="media-viewer-canvas__attachement"
[ngClass]="{ 'collapsed': currentIndex !== att.index }"> [class.collapsed]="currentIndex !== att.index">
<a href="{{att.url}}" target="_blank" title="open image"> <a href="{{att.url}}" target="_blank" title="{{att.description}}">
<img *ngIf="att.type === 'image'" src="{{att.url}}" class="media-viewer-canvas__image" /> <img *ngIf="att.type === 'image'" src="{{att.url}}" class="media-viewer-canvas__image" [class.collapsed]="currentIndex !== att.index" />
</a> </a>
<video *ngIf="att.type === 'gifv'" class="media-viewer-canvas__image" role="application" loop autoplay> <video *ngIf="att.type === 'gifv'" class="media-viewer-canvas__image" role="application" loop autoplay>

View File

@ -76,7 +76,7 @@
max-width: 95%; max-width: 95%;
} }
max-height: calc(100% - 120px); max-height: 90vh;
margin-top: 50vh; margin-top: 50vh;
margin-left: 50vw; margin-left: 50vw;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
@ -104,4 +104,5 @@
.collapsed { .collapsed {
height: 0; height: 0;
max-height: 0;
} }