I’m build a kind of javascript map with javascript and the Raphael lib.
I’m able to zoom on an object when clicked, but I want it to be animated (like slowly diving in and so on). Is there a way to do so without reinventing the wheel?
I’m build a kind of javascript map with javascript and the Raphael lib. I’m
Share
There is no reason that the viewbox of an svg object cannot be animated — Raphael simply doesn’t provide such functionality out of the box. Creating a plugin is reasonably straightforward, however. For instance:
Any paper instantiated after this plugin is installed can use animateViewBox in exactly the same method Raphael’s built-in animate method works. For instance…
Demonstration staged here.