Image rotate
Simply use the rotate left/right links to rotate the image left and right.
Zoom out
Zoom in
Reset
Left
Right
Stuff you could add:
- Animate the rotation with setTimeout() calling the Rotate function for as long as the mousebutton is depressed
- FireFox support using the "canvas" object (apparently)
-
Persistency using AJAX to send the current rotation to a PHP script which stores (eg database/file) it.
You could use the onmouseup event to signal the server when the rotation is done instead of sending every
single update to the server (would generate way too much traffic). Also, as a poor-mans persistency you
could use cookies to store the rotation state.
-
As well as the normal left/right rotation controls you could add finer grained controls by giving a lower
factor as the second argument to the Rotate() function.
- Would be neat to be able to drag the image around... could perhaps combine the rotation with this.
-
Also it would be "very cool" to replace the image with higher res images at certain zoom levels to make it
look nicer. Would (should) simply be a matter of having a higher res image which gets set as the SRC at
certain zoom levels. Like Google maps does when you zoom in.