always use MouseEvent in keyboard hooks

This commit is contained in:
Dimava 2020-05-30 11:11:56 +03:00
parent d5d615bfd3
commit fe33f51424
1 changed files with 2 additions and 5 deletions

View File

@ -442,9 +442,8 @@ export class Camera extends BasicSerializableObject {
this.downPreHandler.dispatch(new Vector(event.clientX, event.clientY), enumMouseButton.middle); this.downPreHandler.dispatch(new Vector(event.clientX, event.clientY), enumMouseButton.middle);
} else if (event.button === 2) { } else if (event.button === 2) {
this.downPreHandler.dispatch(new Vector(event.clientX, event.clientY), enumMouseButton.right); this.downPreHandler.dispatch(new Vector(event.clientX, event.clientY), enumMouseButton.right);
} else {
this.root.app.inputMgr.handleKeydown(event);
} }
this.root.app.inputMgr.handleKeydown(event);
return false; return false;
} }
@ -486,9 +485,7 @@ export class Camera extends BasicSerializableObject {
if (!this.checkPreventDoubleMouse()) { if (!this.checkPreventDoubleMouse()) {
return; return;
} }
if (event.button >= 3) { this.root.app.inputMgr.handleKeyup(event);
this.root.app.inputMgr.handleKeyup(event);
}
this.combinedSingleTouchStopHandler(event.clientX, event.clientY); this.combinedSingleTouchStopHandler(event.clientX, event.clientY);
return false; return false;