minor beautification of keyhandling
This commit is contained in:
parent
4622a67f9e
commit
fd8a5a2ce1
1 changed files with 29 additions and 27 deletions
|
|
@ -6,7 +6,7 @@ var ctx;
|
|||
var locationx;
|
||||
var locationy;
|
||||
var autoscale = false;
|
||||
var radius = 1; // the radius of the circle whe put the photo inside
|
||||
var radius = 1; // the radius of the circle where put the photo inside
|
||||
var zoomfactor = 1;
|
||||
var baseCoordZoom;
|
||||
var trX = 0;
|
||||
|
|
@ -100,8 +100,7 @@ function mouseWheel(event) {
|
|||
mouseMove(event);
|
||||
}
|
||||
|
||||
|
||||
document.onkeydown = function(event) {
|
||||
function keyhandler(event) {
|
||||
var keyCode;
|
||||
var doDraw = false;
|
||||
|
||||
|
|
@ -127,5 +126,8 @@ document.onkeydown = function(event) {
|
|||
if (doDraw) {
|
||||
draw();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
document.onkeypress = keyhandler;
|
||||
document.onkeydown = keyhandler;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue