ctx = c.getContext('2d');
//c.addEventListener('click', e=>getClickCoords(c, 20, 200, 200, e));
c.addEventListener('click', e=>wwonclick(c,ctx,g,xcenter,ycenter,scale,e));
- window.oncontextmenu = (e) => {e.preventDefault();}
- c.oncontextmenu = (e) => wwonrtclick(c,ctx,g,xcenter,ycenter,scale,e)
+ c.oncontextmenu = (e) => {e.preventDefault(); wwonrtclick(c,ctx,g,xcenter,ycenter,scale,e)};
drawGrid(g, ctx, xcenter,ycenter,scale);
document.addEventListener('keydown', e=>{
if(e.key == "p") pptoggle(e);