Hi, I've been searching for this script all day. does anyone know any such script that I can use to rotate an image using mouse drag event. using javascript.
thanks in advance.
Hi, I've been searching for this script all day. does anyone know any such script that I can use to rotate an image using mouse drag event. using javascript.
thanks in advance.
see this
For rotation
http://www.dyn-web.com/code/rotate_images/
For event
http://www.webreference.com/programming/javascript/mk/column2/
http://www.java2s.com/Code/JavaScript/Event/MouseDragandDrop.htm
I am looking for the same functionality.I am able to achieve the rotate image function for image ,but after dragging its not working .
var counter = 1;
$(function() {
$('#test').live('mousedown', function(event) {
if ((counter > 0) && (counter < 350)) {
$('#test').rotate(counter + 45);
counter = counter + 45;
}
else if ((counter > -1) && (counter > 350)) {
counter = 1;
}
});
});
Its changing the dropped image location and weired result. So if anyone done rotating image using mouse after dropping the image please post the code.
Thanks