I am trying to scale a mouse wheel on Raphael's paper using the viewBox. Here is the JSFiddle code.
it works, but now I want to zoom in on the center, and I have no idea where to start. I think I should change the coordinates of viewBox x and y. I tried this (in function descriptor (delta)):
x = paper.width - viewBoxWidth;
y = paper.height - viewBoxHeight;
paper.setViewBox(x,y,viewBoxWidth,viewBoxHeight);
but did not work. I would be grateful for any help. Thank!
source
share