mirror of
https://github.com/trebonian/visual6502.git
synced 2024-12-21 21:29:16 +00:00
[dev]alternate zoom keys
This commit is contained in:
parent
c5e2bfd657
commit
43f06031b0
6
wires.js
6
wires.js
@ -313,9 +313,9 @@ function drawSeg(ctx, seg){
|
||||
function handleKey(e){
|
||||
var c = e.charCode;
|
||||
c = String.fromCharCode(c);
|
||||
if('<>?np'.indexOf(c)==-1) return;
|
||||
if(c=='<' && zoom>1) setZoom(zoom/1.2);
|
||||
else if(c=='>' && zoom<grMaxZoom) setZoom(zoom*1.2);
|
||||
if('<>?npZzx'.indexOf(c)==-1) return;
|
||||
if((c=='Z'||c=='x'||c=='<') && zoom>1) setZoom(zoom/1.2);
|
||||
else if((c=='z'||c=='>') && zoom<grMaxZoom) setZoom(zoom*1.2);
|
||||
else if(c=='?') setZoom(1);
|
||||
else if(c=='n') stepForward();
|
||||
else if(c=='p') stepBack();
|
||||
|
Loading…
Reference in New Issue
Block a user