Domanda

I am using Parallel Coordinates in D3 in my application. I want to add a zoom function programmatically.

Zoom function working well now but I am still have a little problem which is: I want to zoom to the mouse position.

I have the X and Y of the mouse in an array but i do not know how to use them later to zoom in this position.

What I get till now is SVG zoomed but the screen is always in the left and top of the page.

How can I use the mouse position coordinates in zooming to get the area around the mouse cursor on the screen?

È stato utile?

Soluzione

i could do what i want by using window.scrollTo(x,y), so that i can zoom and place the screen to mouse position. maybe i was not clear in my question but that what i want. Thanks,

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top