Second part of Issue 103: tracking of mouse events and new 'rotate' state. Does not actually rotate the element yet.
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@477 eee81c28-f429-11dd-99c0-75d572ba1dddmaster
parent
23069bfbfd
commit
5a62f3b209
|
@ -269,6 +269,9 @@ function SvgCanvas(c)
|
||||||
current_mode = "resize";
|
current_mode = "resize";
|
||||||
current_resize_mode = this.id.substr(13,this.id.indexOf("_",13)-13);
|
current_resize_mode = this.id.substr(13,this.id.indexOf("_",13)-13);
|
||||||
});
|
});
|
||||||
|
$('#selectorGrip_rotate_'+id).mousedown( function() {
|
||||||
|
current_mode = "rotate";
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.showGrips = function(show) {
|
this.showGrips = function(show) {
|
||||||
|
@ -1368,6 +1371,9 @@ function SvgCanvas(c)
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
case "rotate":
|
||||||
|
started = true;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
console.log("Unknown mode in mousedown: " + current_mode);
|
console.log("Unknown mode in mousedown: " + current_mode);
|
||||||
|
@ -1660,6 +1666,8 @@ function SvgCanvas(c)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case "rotate":
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2026,6 +2034,11 @@ function SvgCanvas(c)
|
||||||
canvas.addToSelection([evt.target]);
|
canvas.addToSelection([evt.target]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case "rotate":
|
||||||
|
keep = true;
|
||||||
|
element = null;
|
||||||
|
current_mode = "select";
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
console.log("Unknown mode in mouseup: " + current_mode);
|
console.log("Unknown mode in mouseup: " + current_mode);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue