I try to zoom with mousewheel on a Raphael paper using viewBox. Here is the JSFiddle code.
it works but now i want to zoom in the center and i have no idea where to start. I guess i should change the viewBox x and y coordinates. I have tried this (in the function handle(delta)):
x = paper.width - viewBoxWidth;
y = paper.height - viewBoxHeight;
paper.setViewBox(x,y,viewBoxWidth,viewBoxHeight);
but didnt work. I would appreciate any help. Thank you!
Since your question has been answered on the mailing list I'll paste this here for future reference:
https://groups.google.com/forum/#!topic/raphaeljs/K-84cOe8ZP8