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

View File

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