feat(container.scss): add container styles for fixed position and scrolling behavior

feat(container.ts): create container module to handle scrollable behavior and add/remove disableScroll class

fix(customCursor.ts): update append target for cursor element to use container instead of main

fix(stage.ts): update append target for stage element to use container instead of main

fix(stageNav.ts): update append target for navOverlay element to use container instead of main

feat(main.ts): initialize container module and conditionally initialize stage and stageNav modules based on device type

fix(nav.ts): update references to state module functions to use state.get() instead of getState()
This commit is contained in:
Sped0n
2023-10-29 22:12:06 +08:00
parent c419b304df
commit 047ec5c630
8 changed files with 70 additions and 22 deletions

View File

@@ -1,4 +1,4 @@
import { getState, incThreshold, decThreshold } from './state'
import { decThreshold, incThreshold, state } from './state'
import { expand } from './utils'
/**
@@ -48,15 +48,15 @@ export function initNav() {
// helper
export function updateThresholdText(): void {
const thresholdValue: string = expand(getState().threshold)
const thresholdValue: string = expand(state.get().threshold)
thresholdDispNums.forEach((e: HTMLSpanElement, i: number) => {
e.innerText = thresholdValue[i]
})
}
export function updateIndexText(): void {
const indexValue: string = expand(getState().index + 1)
const indexLength: string = expand(getState().length)
const indexValue: string = expand(state.get().index + 1)
const indexLength: string = expand(state.get().length)
indexDispNums.forEach((e: HTMLSpanElement, i: number) => {
if (i < 4) {
e.innerText = indexValue[i]