fix(customCursor.ts): fix variable declaration and initialization for cursor and cursorInner to improve code readability and maintainability

feat(customCursor.ts): add support for setting custom text for cursorInner to display different cursor text
fix(stage.ts): fix variable declaration and initialization for imgs, last, cordHist, isOpen, isAnimating, and active to improve code readability and maintainability
feat(stage.ts): add support for minimizing image and initialize stage with image JSON data
fix(stageNav.ts): fix variable declaration and initialization for navItems to improve code readability and maintainability
feat(stageNav.ts): add support for handling click and key events for stage navigation
fix(nav.ts): fix variable declaration and initialization for thresholdDiv and indexDispNums to improve code readability and maintainability
feat(nav.ts): initialize nav and update threshold text
This commit is contained in:
Sped0n
2023-10-29 15:09:10 +08:00
parent 6848e413ca
commit 2025a57ae4
4 changed files with 65 additions and 22 deletions

View File

@@ -1,6 +1,10 @@
import { getState, incThreshold, decThreshold } from './state'
import { expand } from './utils'
/**
* variables
*/
// threshold div
const thresholdDiv = document
.getElementsByClassName('threshold')
@@ -27,6 +31,10 @@ const indexDispNums = Array.from(
indexDiv.getElementsByClassName('num')
) as HTMLSpanElement[]
/**
* init
*/
export function initNav() {
// init threshold text
updateThresholdText()