Attempt to fix scrolling (again)

This commit is contained in:
Matei Adriel 2023-10-29 06:57:06 +01:00
parent 4afe680833
commit 4fa5e771e0
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -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}`)

View file

@ -81,7 +81,7 @@ export class SimulationRenderer {
public updateWheelListener(ref: RefObject<HTMLCanvasElement>) {
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)