mirror of
https://github.com/trebonian/visual6502.git
synced 2024-06-02 17:41:31 +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){
|
function handleKey(e){
|
||||||
var c = e.charCode;
|
var c = e.charCode;
|
||||||
c = String.fromCharCode(c);
|
c = String.fromCharCode(c);
|
||||||
if('<>?np'.indexOf(c)==-1) return;
|
if('<>?npZzx'.indexOf(c)==-1) return;
|
||||||
if(c=='<' && zoom>1) setZoom(zoom/1.2);
|
if((c=='Z'||c=='x'||c=='<') && zoom>1) setZoom(zoom/1.2);
|
||||||
else if(c=='>' && zoom<grMaxZoom) setZoom(zoom*1.2);
|
else if((c=='z'||c=='>') && zoom<grMaxZoom) setZoom(zoom*1.2);
|
||||||
else if(c=='?') setZoom(1);
|
else if(c=='?') setZoom(1);
|
||||||
else if(c=='n') stepForward();
|
else if(c=='n') stepForward();
|
||||||
else if(c=='p') stepBack();
|
else if(c=='p') stepBack();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user