now html element can be generated by typescript

This commit is contained in:
Spedon
2023-03-21 11:55:05 +08:00
parent 6eff09f717
commit 7da5c2228a
7 changed files with 61 additions and 49 deletions

View File

@@ -1,25 +1,17 @@
import { overlayEnable } from './overlay'
import {
calcImageIndex,
center,
createImgElement,
delay,
FIFO,
layerPosSet,
center,
type position,
createImgElement,
calcImageIndex,
delay
type position
} from './utils'
import { thresholdSensitivityArray, thresholdIndex } from './thresholdCtl'
import { thresholdIndex, thresholdSensitivityArray } from './thresholdCtl'
import { imgIndexSpanUpdate } from './indexDisp'
import { imagesArrayLen, imagesArray } from './dataFetch'
// get layer divs
export const layers: HTMLDivElement[] = [
document.getElementById('layer1') as HTMLDivElement,
document.getElementById('layer2') as HTMLDivElement,
document.getElementById('layer3') as HTMLDivElement,
document.getElementById('layer4') as HTMLDivElement,
document.getElementById('layer5') as HTMLDivElement
]
import { imagesArray, imagesArrayLen } from './dataFetch'
import { layers } from './elemGen'
// top layer position caching
let topLayerPos: number[] = [0, 0]