add missing mobile click emitter
This commit is contained in:
parent
b09ddd13b4
commit
7964954a0d
|
@ -412,6 +412,18 @@ export class PanZoom extends EventEmitter<PanZoomEvents> {
|
|||
const dx = Math.abs(this.panning.x - touch.clientX);
|
||||
const dy = Math.abs(this.panning.y - touch.clientY);
|
||||
|
||||
if (Date.now() - this.touch.lastTouch < 500 && dx < 5 && dy < 5) {
|
||||
this.emit("click", {
|
||||
clientX: touch.clientX,
|
||||
clientY: touch.clientY,
|
||||
button: "LCLICK",
|
||||
alt: false,
|
||||
shift: false,
|
||||
ctrl: false,
|
||||
meta: false,
|
||||
});
|
||||
}
|
||||
|
||||
if (Date.now() - this.touch.lastTouch > 500 && dx < 25 && dy < 25) {
|
||||
this.emit("longPress", this.panning.x, this.panning.y);
|
||||
}
|
||||
|
|
|
@ -355,6 +355,8 @@ class Canvas {
|
|||
// maybe only update specific element?
|
||||
// i don't think it needs to be awaited
|
||||
await this.updateCanvasRedisAtPos(x, y);
|
||||
|
||||
Logger.info(`${user.sub} placed pixel at (${x}, ${y})`);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue