fixe position issue

This commit is contained in:
Didictateur 2025-03-24 14:15:20 +01:00
parent 264168ea91
commit 2061b39c11
3 changed files with 9 additions and 3 deletions

View file

@ -6,3 +6,8 @@ all:
clean:
rm -rf build/
hard-clean:
rm -rf build/
rm -rf node_modules/
rm -f package-lock.json

View file

@ -26,7 +26,7 @@ export function clickAction(
return -1;
}
let xmin = 960 - buttons.filter(c => c[0]).length * 120;
let inside = 492 < y && y < 544;
let inside = 838 < y && y < 888;
let q = Math.floor((x - xmin) / 120);
let r = (x - xmin) - 120 * q;
if (

View file

@ -93,9 +93,10 @@ export class Game {
public click(
mp: mousePos,
): void {
const rect = this.cv.getBoundingClientRect();
let action = clickAction(
mp.x,
mp.y,
mp.x - rect.left,
mp.y - rect.top,
this.canDoAChii().length > 0,
this.canDoAPon(),
false && this.level > 1,