An open API service indexing awesome lists of open source software.

https://github.com/thinkphp/rotate

A simple function JavaScript that allows you to rotate images by the given angle (radians or degrees).
https://github.com/thinkphp/rotate

Last synced: 3 months ago
JSON representation

A simple function JavaScript that allows you to rotate images by the given angle (radians or degrees).

Awesome Lists containing this project

README

          

Rotate
======

A simple function JavaScript that allows you to rotate images.

Syntax
======

1.Rotate(HTMLImageElement image, String angle)
@param image (HTMLImageElement) an image element.
@param angle (String) angle either radians or degrees ('45deg' or '40rad')

2.Rotate(HTMLImageElement image, Number angle)
@param image (HTMLImageElement) an image element.
@param angle (Number) angle in radians.

Usage
=====

Rotate(document.getElementById('rotate_me'),'45deg');
Rotate(document.getElementById('rotate_me'),Math.PI/2);
Rotate(document.getElementById('rotate_me'),Math.PI/2);

Browser Support
===============

Firefox 1.5+
IE 6+
Opera 9.5+
Google Chrome
Safari 2+