Leaderboard


Popular Content

Showing most liked content on 07/04/2017 in all areas

  1. 1 like
    I'm not sure what code you're using to get the mouse offset, but once you have it you can calculate the correct position by dividing the canvas real size by its visible size. // Assuming we already have a reference to canvas and the mouse's position // relative to it is in visibleX and visibleY var horizontalRatio = canvas.width / canvas.offsetWidth; var verticalRatio = canvas.height / canvas.offserHeight; var realX = horizontalRatio * visibleX; var realY = verticalRatio * visibleY; // Do something with realX and realY
  2. 1 like
    Place both if conditions for setting modal and login to display none, in a single window.onclick function