I am using jQuery UI to drag and drop an image. I also want to rotate the image 360 degrees so I can move and rotate it like in Photoshop. I am using the jQuery rotate plugin to rotate the image on click, but I want to select a corner and drag to rotate the image to any angle.
Live JS: http://jsfiddle.net/87jaR/
JavaScript code:
var test = 5;
$(function()
{
$('#rotate').draggable({ containment: 'frame' });
$('#frame img').live('mousedown', function(event)
{
test = test + 15;
$(this).rotate({ angle: test });
});
});
Pls check with this one, Fiddle http://jsfiddle.net/prasanthkc/frz8J/
})
1) Here
degmeansdegree, Either you can useradforradians2) You can change the rotating point by changing
transform-originFor Eg:
transform-origin: 50% 50%will move the rotating point to center.