HTML Code: The Zoom Component
<div class="zoom py-3">
<i nz-icon nzType="minus" (click)="zoomToggle(false)" nzTheme="outline"></i><br>
<i nz-icon nzType="plus" (click)="zoomToggle(true)" nzTheme="outline"></i><br>
<i nz-icon nzType="drag" [class.active]="zoomDrag" (click)="toggleZoomDrag()" nzTheme="outline"></i>
<i nz-icon nzType="undo" (click)="zoomToggle(null, true)" nzTheme="outline"></i>
<br><i nz-icon nzType="edit" [class.active]="editing" (click)="toggleEditing()" nzTheme="outline"></i>
</div>
TypeScript Logic: Handling Zoom Functions
editing = false;
zoomDrag = false
toogleZoomDrag() {
this.zoomDrag = !zoomDrag;
}
zoomToggle() {
this.editing = !editing;
}
The issue arises when the icon move
is clicked and becomes active. Subsequently, clicking the icon edit
should deactivate the icon move
.
For better clarity, here are examples:
https://i.sstatic.net/XEPcg.png
Clicking the icon move activates it. Then, clicking on editing results in deactivating the icon move.
https://i.sstatic.net/8KNXd.png
Upon clicking the icon move again while still editing, it should remain active as depicted in the second photo. However, clicking editing should deactivate both icons - replicating the desired behavior shown below.