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