Open lead-to-sato opened 2 years ago
I'm trying to use setZoom in the PRO version to zoom around the coordinates specified by center, but it doesn't work. Can you please tell me what is happening? Here is the source code, framework and image size. Thanks in advance.
imageSize:1828 * 1828 framework: Angular12 source code: [test.component.ts]
export class TestComponent implements OnInit { @ViewChild('myPinch') PinchZoom: any; @ViewChild('img') img?: ElementRef; constructor() {} ngOnInit() { } setZoom() { if (this.PinchZoom) { const test = this.PinchZoom as IvyPinch; test.setZoom({ scale: 5, center: [400, 400] }); } } }
[test.component.html]
<div style="width: 1828px; height: 1828px;"> <pinch-zoom #myPinch [limit-zoom]="6" [limitPan]="true"> <img #img src="assets/test.png"> </pinch-zoom> </div> <input type="button" value="setZoom" (click)="setZoom()">
@lead-to-sato where to get PRO version, https://ivylab.space/pinch-zoom said not currently available.
I'm trying to use setZoom in the PRO version to zoom around the coordinates specified by center, but it doesn't work. Can you please tell me what is happening? Here is the source code, framework and image size. Thanks in advance.
imageSize:1828 * 1828 framework: Angular12 source code: [test.component.ts]
[test.component.html]