Hai all,
I want to achieve the Resize,Drag and rotate functionality on an image seleted by the user.I am able to do all these in separate function ,but couldn't incorporate in single function. Since the images are dynamically created,i need a single function. For example If i join rotate with rezizable it's not working as expected.
Any body plz help me.
$('.planspace-image').draggable({});
.resizable();
$('.upload_pic')
.resizable({
start: function(e, ui) {
},
resize: function(e, ui) {
},
stop: function(e, ui) {
//alert('resizing stopped');
}
});
This is the my rotate function
var rotate = false;
var drag = true;
$('.rotate').live('mousedown',function(e)
{
rotate=true;
$(document).mousemove(function(e2) {
$('.planspace-image').draggable({ disabled: true }); //not working
$('.planspace-image').resizable({ disabled:true }); //not working
if(rotate == true )
{
rotateOnMouse(e2,$('.upload_pic'));
}
});
$(document).mouseup( function() {
rotate=false;
$('.planspace-image').draggable({ disabled: false }); //not working
$('.upload_pic').resizable({ disabled:false }); //not working
});
I am able to achieve the functionalities but not as i expected
for examble,resize working time drag and rotate function not working as expected.
anybody plz help me.
how to change my code.or any other way.