I have a Rafael paper that works like Google map.
Like a map, there is a main content, and many overlays engage on top of it, like those pins and markers on Google pin.
So when I'm zooming, I want the main content to zoom in, and take those overlays to the right position but stay in the original size. (For example, in Google Maps, when I zoom a city, those overlays will always be attached to the correct address on the screen with the same size).
I am currently creating thousands of papers, and keeping my position on manually zoomed but due to this there are so many things, so it is interesting to know if it is possible to remove everything in one paper is. And while zooming, do some magic to stop those elements. Something like:
paper. True (0, 0, 10, 10) .attr ({resize: false})
< P> You only need two papers on each other, while zooming down the paper, use setViewBox on top paper, recalculate posts and translate ( .transform (' T ...) ) Each element
No comments:
Post a Comment