O'Reilly logo

Learning Raphaël JS Vector Graphics by Damian Dawber

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4. Transformations and Event Handling

Having spent the past two chapters drawing static graphics, we will now start to look at how we can transform them and how we can interact with them in the browser.

When you create an element in Raphaël, you are effectively creating a Document Object Model (DOM) object. Like the DOM objects you are already familiar with elements drawn on to our canvas will trigger events when interacted with by a user. Raphaël provides a number of convenient, cross-browser methods for interacting with elements and also provides methods that facilitate the drag-and-drop functionality.

Transformations are equally versatile: Raphaël gives us the ability to transform (translate, scale, and rotate) elements with ease using ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required