mirror of
https://github.com/Sped0n/bridget.git
synced 2026-04-21 05:29:31 -07:00
change function name
This commit is contained in:
@@ -97,7 +97,7 @@ export const getDeviceType = (): deviceType => {
|
|||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
const autoHide = (e: HTMLImageElement): void => {
|
export const hideImage = (e: HTMLImageElement): void => {
|
||||||
e.style.visibility = 'hidden'
|
e.style.visibility = 'hidden'
|
||||||
e.dataset.status = 'trail'
|
e.dataset.status = 'trail'
|
||||||
}
|
}
|
||||||
@@ -122,7 +122,7 @@ export const pushIndex = (
|
|||||||
// pop out
|
// pop out
|
||||||
overflow = indexesArray.shift() as number
|
overflow = indexesArray.shift() as number
|
||||||
// auto hide tail image
|
// auto hide tail image
|
||||||
if (autoHideFlag) autoHide(imagesArray[overflow])
|
if (autoHideFlag) hideImage(imagesArray[overflow])
|
||||||
} else {
|
} else {
|
||||||
indexesArray.push(index)
|
indexesArray.push(index)
|
||||||
indexesNum += 1
|
indexesNum += 1
|
||||||
@@ -135,7 +135,7 @@ export const pushIndex = (
|
|||||||
// pop out
|
// pop out
|
||||||
overflow = indexesArray.pop() as number
|
overflow = indexesArray.pop() as number
|
||||||
// auto hide tail image
|
// auto hide tail image
|
||||||
if (autoHideFlag) autoHide(imagesArray[overflow])
|
if (autoHideFlag) hideImage(imagesArray[overflow])
|
||||||
} else {
|
} else {
|
||||||
indexesArray.unshift(calcImageIndex(index - indexesNum + 1, imagesArrayLen))
|
indexesArray.unshift(calcImageIndex(index - indexesNum + 1, imagesArrayLen))
|
||||||
indexesNum += 1
|
indexesNum += 1
|
||||||
|
|||||||
Reference in New Issue
Block a user