From: Elijah Cohen Date: Fri, 1 Apr 2022 12:11:41 +0000 (-0500) Subject: rtclick disabled only for canvas now X-Git-Url: https://git.eli173.com/?a=commitdiff_plain;h=d012eeb71df762de1c4ed1ebb70e2453d526c1dd;p=hexmata rtclick disabled only for canvas now --- diff --git a/play.js b/play.js index d815d90..7ff4297 100644 --- a/play.js +++ b/play.js @@ -44,8 +44,7 @@ function lc() { 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);