Describe your question
As always, first of all, I want to congratulate you on your great work, it's incredible. I'm in the process of updating Two.js in my Angular 13 application (from 8.1.1 to 8.11), but I'm encountering an issue with Zoom (via ZUI) that I had implemented, which was working perfectly before, but now it's giving me an error. The error is very similar to what happens when you try to zoom using the scroll wheel in the sample projects you have (https://codepen.io/jonobr1/pen/PobMKwb).
In my applicaction, this is the result of applying the 'zoomby' method (Debugging in the devtools Chrome)
After that:
(Note: "y" is negative because I changed the coordinate origin to the bottom left)
This is how I declare and initialize the objects in version 8.11 (it's almost the same as the one used in 8.1.1):
...
import Two from 'two.js';
import { ZUI } from 'two.js/extras/jsm/zui.js';
import { Group } from 'two.js/src/group';
import { Path } from 'two.js/src/path';
import { Points } from 'two.js/src/shapes/points';
import { Vector } from 'two.js/src/vector';
....
this.map.two = new Two({
type: Two.Types.svg,
fitted:true,
}).appendTo(this.drawArea.nativeElement);
...
this.map.zui = new ZUI(this.map.stage);
this.map.zui.addLimits( -Infinity, Infinity);
In the map service, I define
zui: ZUI;
two: Two;
Nothing special!
Just like in the example project's code, panning works for me, but zoom doesn't.
I've gone through it many times, and I can't find the problem. It's starting to become quite frustrating. Any ideas on what might be happening?
Describe your question As always, first of all, I want to congratulate you on your great work, it's incredible. I'm in the process of updating Two.js in my Angular 13 application (from 8.1.1 to 8.11), but I'm encountering an issue with Zoom (via ZUI) that I had implemented, which was working perfectly before, but now it's giving me an error. The error is very similar to what happens when you try to zoom using the scroll wheel in the sample projects you have (https://codepen.io/jonobr1/pen/PobMKwb).
In my applicaction, this is the result of applying the 'zoomby' method (Debugging in the devtools Chrome)
After that:![image](https://github.com/jonobr1/two.js/assets/43202289/664985d3-ea30-40be-8b1b-9d55aedea3a4)
(Note: "y" is negative because I changed the coordinate origin to the bottom left)
This is how I declare and initialize the objects in version 8.11 (it's almost the same as the one used in 8.1.1):
... import Two from 'two.js'; import { ZUI } from 'two.js/extras/jsm/zui.js'; import { Group } from 'two.js/src/group'; import { Path } from 'two.js/src/path'; import { Points } from 'two.js/src/shapes/points'; import { Vector } from 'two.js/src/vector'; ....
this.map.two = new Two({ type: Two.Types.svg, fitted:true, }).appendTo(this.drawArea.nativeElement); ...
In the map service, I define zui: ZUI; two: Two;
Nothing special!
Just like in the example project's code, panning works for me, but zoom doesn't.
I've gone through it many times, and I can't find the problem. It's starting to become quite frustrating. Any ideas on what might be happening?
Thanks in advance.