mirror of
https://github.com/Sped0n/bridget.git
synced 2026-04-21 05:29:31 -07:00
now the overlay delay time will change with the stack depth
This commit is contained in:
@@ -124,7 +124,7 @@ async function enterOverlay(): Promise<void> {
|
|||||||
e.style.transitionDelay = `${0.1 * i}s`
|
e.style.transitionDelay = `${0.1 * i}s`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await delay(1600)
|
await delay(stackDepth * 100 + 100 + 1000)
|
||||||
// Offset previous self increment of global index (by handleOnMove)
|
// Offset previous self increment of global index (by handleOnMove)
|
||||||
globalIndexDec()
|
globalIndexDec()
|
||||||
// overlay init
|
// overlay init
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ import {
|
|||||||
transformCache,
|
transformCache,
|
||||||
pushIndex,
|
pushIndex,
|
||||||
emptyTransformCache,
|
emptyTransformCache,
|
||||||
emptyTrailingImageIndexes
|
emptyTrailingImageIndexes,
|
||||||
|
stackDepth
|
||||||
} from './desktop'
|
} from './desktop'
|
||||||
import { imagesArrayLen } from './dataFetch'
|
import { imagesArrayLen } from './dataFetch'
|
||||||
import { imgIndexSpanUpdate } from './indexDisp'
|
import { imgIndexSpanUpdate } from './indexDisp'
|
||||||
@@ -63,7 +64,7 @@ async function handleCloseClick(): Promise<void> {
|
|||||||
e.style.zIndex = `${indexesNum - i - 1}`
|
e.style.zIndex = `${indexesNum - i - 1}`
|
||||||
e.dataset.status = i === 0 ? 'resumeTop' : 'resume'
|
e.dataset.status = i === 0 ? 'resumeTop' : 'resume'
|
||||||
}
|
}
|
||||||
await delay(1700)
|
await delay(1200 + stackDepth * 100 + 100)
|
||||||
for (let i: number = 0; i < indexesNum; i++) {
|
for (let i: number = 0; i < indexesNum; i++) {
|
||||||
images[calcImageIndex(globalIndex - i, imagesArrayLen)].dataset.status = 'null'
|
images[calcImageIndex(globalIndex - i, imagesArrayLen)].dataset.status = 'null'
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user