fixe position issue
This commit is contained in:
parent
264168ea91
commit
2061b39c11
3 changed files with 9 additions and 3 deletions
5
Makefile
5
Makefile
|
|
@ -6,3 +6,8 @@ all:
|
|||
|
||||
clean:
|
||||
rm -rf build/
|
||||
|
||||
hard-clean:
|
||||
rm -rf build/
|
||||
rm -rf node_modules/
|
||||
rm -f package-lock.json
|
||||
|
|
|
|||
|
|
@ -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 (
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue