【发布时间】:2021-05-05 23:05:11
【问题描述】:
我正在尝试从 ngx-image-cropper 放大和缩小。我没有收到任何错误,但是当我单击 zoomOut 或 ZoomIn 按钮时,它不起作用。
我在这里做错了什么?
我的 TS 代码
zoomOut() {
this.scale -= .1;
this.transform = {
...this.transform,
scale: this.scale
};
}
zoomIn() {
this.scale += .1;
this.transform = {
...this.transform,
scale: this.scale
};
}
我的 HTML 代码
<button class="btn zoomIn" (click)="zoomIn()" tooltip="Zoom In" data-toggle="tooltip" data-placement="top" title="Zoom In"></button>
<button class="btn zoomOut" (click)="zoomOut()" tooltip="Zoom Out" data-toggle="tooltip" data-placement="top" title="Zoom Out"></button>
【问题讨论】:
标签: angular typescript angular8 ngx-image-cropper