diff --git a/www/js/interface.js b/www/js/interface.js index 9840a61..8d9c72e 100644 --- a/www/js/interface.js +++ b/www/js/interface.js @@ -147,7 +147,7 @@ const INTERFACE = { let basis_y = INTERFACE_DATA.Render.offset.y + (14 * apothem); let x = (mouse_x - basis_x) / grid_offset_x; - let y = -(event.offsetY - basis_y) / apothem; + let y = -(mouse_y - basis_y) / apothem; let kx = Math.floor(x); let ky = Math.floor(y); @@ -178,7 +178,7 @@ const INTERFACE = { let basis_y = INTERFACE_DATA.Render.offset.y + (3 * apothem); let x = (mouse_x - basis_x) / grid_offset_x; - let y = (event.offsetY - basis_y) / apothem; + let y = (mouse_y - basis_y) / apothem; let kx = Math.floor(x); let ky = Math.floor(y);