From 0ac4a933a6ab89f792edc1f138684c0c2477828b Mon Sep 17 00:00:00 2001 From: "Lukas Rieger (Blue)" Date: Wed, 8 Feb 2023 18:47:10 +0100 Subject: [PATCH] Fix menu-scrolling not working in freeflight mode --- .../webapp/src/js/controls/freeflight/FreeFlightControls.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BlueMapCommon/webapp/src/js/controls/freeflight/FreeFlightControls.js b/BlueMapCommon/webapp/src/js/controls/freeflight/FreeFlightControls.js index d92f44df..17f876a7 100644 --- a/BlueMapCommon/webapp/src/js/controls/freeflight/FreeFlightControls.js +++ b/BlueMapCommon/webapp/src/js/controls/freeflight/FreeFlightControls.js @@ -78,7 +78,7 @@ export class FreeFlightControls { this.target.addEventListener("contextmenu", this.onContextMenu); this.target.addEventListener("mousedown", this.onMouseDown); this.target.addEventListener("mouseup", this.onMouseUp); - window.addEventListener("wheel", this.onWheel, {passive: false}); + this.target.addEventListener("wheel", this.onWheel, {passive: false}); } stop() { @@ -91,7 +91,7 @@ export class FreeFlightControls { this.target.removeEventListener("contextmenu", this.onContextMenu); this.target.removeEventListener("mousedown", this.onMouseDown); this.target.removeEventListener("mouseup", this.onMouseUp); - window.removeEventListener("wheel", this.onWheel); + this.target.removeEventListener("wheel", this.onWheel); } /**