Fix scrolling on github pages not working
This commit is contained in:
parent
d6200cffef
commit
4afe680833
|
@ -81,7 +81,7 @@ export class SimulationRenderer {
|
|||
public updateWheelListener(ref: RefObject<HTMLCanvasElement>) {
|
||||
if (ref.current) {
|
||||
ref.current.addEventListener('wheel', (event) => {
|
||||
if (!modalIsOpen() && location.pathname === '/') {
|
||||
if (!modalIsOpen() && location.pathname === process.env.BASEURL) {
|
||||
event.preventDefault()
|
||||
|
||||
handleScroll(event, this.camera)
|
||||
|
@ -125,9 +125,7 @@ export class SimulationRenderer {
|
|||
if (!gate) {
|
||||
throw new SimulationError(`Cannot find gate with id ${id}`)
|
||||
} else if (!gate.data) {
|
||||
throw new SimulationError(
|
||||
`Cannot find data of gate with id ${id}`
|
||||
)
|
||||
throw new SimulationError(`Cannot find data of gate with id ${id}`)
|
||||
}
|
||||
|
||||
return gate.data
|
||||
|
|
Loading…
Reference in a new issue