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>) {
|
public updateWheelListener(ref: RefObject<HTMLCanvasElement>) {
|
||||||
if (ref.current) {
|
if (ref.current) {
|
||||||
ref.current.addEventListener('wheel', (event) => {
|
ref.current.addEventListener('wheel', (event) => {
|
||||||
if (!modalIsOpen() && location.pathname === '/') {
|
if (!modalIsOpen() && location.pathname === process.env.BASEURL) {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
|
|
||||||
handleScroll(event, this.camera)
|
handleScroll(event, this.camera)
|
||||||
|
@ -125,9 +125,7 @@ export class SimulationRenderer {
|
||||||
if (!gate) {
|
if (!gate) {
|
||||||
throw new SimulationError(`Cannot find gate with id ${id}`)
|
throw new SimulationError(`Cannot find gate with id ${id}`)
|
||||||
} else if (!gate.data) {
|
} else if (!gate.data) {
|
||||||
throw new SimulationError(
|
throw new SimulationError(`Cannot find data of gate with id ${id}`)
|
||||||
`Cannot find data of gate with id ${id}`
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return gate.data
|
return gate.data
|
||||||
|
|
Loading…
Reference in a new issue