Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the professional version about setZoom method #98

Open
lead-to-sato opened this issue Oct 20, 2021 · 1 comment
Open

the professional version about setZoom method #98

lead-to-sato opened this issue Oct 20, 2021 · 1 comment

Comments

@lead-to-sato
Copy link

lead-to-sato commented Oct 20, 2021

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()">
@playground
Copy link

@lead-to-sato where to get PRO version, https://ivylab.space/pinch-zoom said not currently available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants