refractor: change var name

This commit is contained in:
Sped0n
2023-08-13 22:33:47 +08:00
parent c2f9627717
commit b1415b7f17
8 changed files with 34 additions and 34 deletions

View File

@@ -10,7 +10,7 @@ import {
} from './utils'
import { thresholdIndex, thresholdSensitivityArray } from './thresholdCtl'
import { imgIndexSpanUpdate } from './indexDisp'
import { imagesArrayLen } from './dataFetch'
import { imagesLen } from './dataFetch'
import { imagesDivNodes as images } from './elemGen'
// global index for "activated"
@@ -55,7 +55,7 @@ const activate = (index: number, mouseX: number, mouseY: number): void => {
trailingImageIndexes,
stackDepth,
images,
imagesArrayLen
imagesLen
)
// set img position
images[index].style.transform = mouseToTransform(mouseX, mouseY, true, true)
@@ -81,10 +81,10 @@ export const handleOnMove = (e: MouseEvent): void => {
window.innerWidth / thresholdSensitivityArray[thresholdIndex]
) {
// calculate the actual index
const imageIndex = calcImageIndex(globalIndex, imagesArrayLen)
const imageIndex = calcImageIndex(globalIndex, imagesLen)
// show top image and change index
activate(imageIndex, e.clientX, e.clientY)
imgIndexSpanUpdate(imageIndex + 1, imagesArrayLen)
imgIndexSpanUpdate(imageIndex + 1, imagesLen)
// self increment
globalIndexInc()
}