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-75d572ba1ddd
master
Jeff Schiller 2009-08-26 19:45:28 +00:00
parent 23069bfbfd
commit 5a62f3b209
1 changed files with 13 additions and 0 deletions

View File

@ -269,6 +269,9 @@ function SvgCanvas(c)
current_mode = "resize";
current_resize_mode = this.id.substr(13,this.id.indexOf("_",13)-13);
});
$('#selectorGrip_rotate_'+id).mousedown( function() {
current_mode = "rotate";
});
}
this.showGrips = function(show) {
@ -1368,6 +1371,9 @@ function SvgCanvas(c)
}, 100);
}
break;
case "rotate":
started = true;
break;
default:
console.log("Unknown mode in mousedown: " + current_mode);
@ -1660,6 +1666,8 @@ function SvgCanvas(c)
}
}
break;
case "rotate":
break;
default:
break;
}
@ -2026,6 +2034,11 @@ function SvgCanvas(c)
canvas.addToSelection([evt.target]);
}
break;
case "rotate":
keep = true;
element = null;
current_mode = "select";
break;
default:
console.log("Unknown mode in mouseup: " + current_mode);
break;