bug fixed

This commit is contained in:
richard-loafle 2020-01-30 17:59:13 +09:00
parent f8c717551e
commit 8f7092def9

View File

@ -159,6 +159,7 @@
</div>
<div class="ucap-image-viewer-body">
<div
#imageContainer
class="ucap-image-viewer-image-wrapper"
fxLayout="row"
fxLayout.xs="column"
@ -169,8 +170,15 @@
#downloadImage
*ngIf="fileDownloadUrl"
[src]="fileDownloadUrl"
[style.width]="(zoomRatio / 100) * naturalWidth + 'px'"
[style.height]="'auto'"
[style.width]="'auto'"
[style.height]="
naturalHeight > imageContainer.clientHeight
? ((imageContainer.clientHeight - 20) / naturalHeight) *
(zoomRatio / 100) *
naturalHeight +
'px'
: naturalHeight + 'px'
"
(load)="onLoadFileDownloadUrl(downloadImage)"
/>
</div>