From 4fa5e771e088adfb8efa9c5de4c833c8300a483a Mon Sep 17 00:00:00 2001 From: Matei Adriel Date: Sun, 29 Oct 2023 06:57:06 +0100 Subject: [PATCH] Attempt to fix scrolling (again) --- build.js | 2 +- src/modules/simulationRenderer/classes/SimulationRenderer.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.js b/build.js index 1afe1ef..99c7b2a 100644 --- a/build.js +++ b/build.js @@ -4,7 +4,7 @@ import { sassPlugin } from 'esbuild-sass-plugin' import * as fs from 'fs' const serve = process.env.ESBUILD_SERVE === '1' -const baseurl = process.env.ESBUILD_BASEURL || '/' +const baseurl = process.env.ESBUILD_BASEURL || '' console.log(`Building with baseurl ${baseurl}`) diff --git a/src/modules/simulationRenderer/classes/SimulationRenderer.ts b/src/modules/simulationRenderer/classes/SimulationRenderer.ts index 5e039a5..0bf987e 100644 --- a/src/modules/simulationRenderer/classes/SimulationRenderer.ts +++ b/src/modules/simulationRenderer/classes/SimulationRenderer.ts @@ -81,7 +81,7 @@ export class SimulationRenderer { public updateWheelListener(ref: RefObject) { if (ref.current) { ref.current.addEventListener('wheel', (event) => { - if (!modalIsOpen() && location.pathname === process.env.BASEURL) { + if (!modalIsOpen() && location.pathname === `${process.env.BASEURL}/`) { event.preventDefault() handleScroll(event, this.camera)