|
|
@@ -208,10 +208,10 @@ function buildFxCss() {
|
|
|
will-change:transform,opacity;
|
|
|
}
|
|
|
@keyframes markerOverlayDrop {
|
|
|
- 0% { translate: 0 -20px; scale: 0.96; opacity: 0; }
|
|
|
- 70% { translate: 0 0; scale: 1; opacity: 1; }
|
|
|
- 84% { translate: 0 -3px; scale: 1; opacity: 1; }
|
|
|
- 100% { translate: 0 0; scale: 1; opacity: 1; }
|
|
|
+ 0% { translate: 0 -20px; opacity: 0; }
|
|
|
+ 70% { translate: 0 0; opacity: 1; }
|
|
|
+ 84% { translate: 0 -3px; opacity: 1; }
|
|
|
+ 100% { translate: 0 0; opacity: 1; }
|
|
|
}
|
|
|
.marker-overlay-node--enter { animation: markerOverlayDrop 240ms cubic-bezier(0.2, 0.75, 0.3, 1) both; }
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
|
@@ -638,6 +638,32 @@ function applyEntrance(root, key) {
|
|
|
root.addEventListener('animationend', finish, { once: true })
|
|
|
if (typeof window !== 'undefined' && window.setTimeout) window.setTimeout(finish, 420 + delay)
|
|
|
}
|
|
|
+/** 每次“重新加载点位”时重播一次落图:清空已见集合,并给当前可见节点补一次。 */
|
|
|
+let entranceReplayGeneration = 0
|
|
|
+export function replayMarkerEntrance() {
|
|
|
+ const generation = ++entranceReplayGeneration
|
|
|
+ entranceSeen.clear()
|
|
|
+ entranceSequence = 0
|
|
|
+ const records = []
|
|
|
+ for (const [key, record] of pool) {
|
|
|
+ if (!record || !record.root || record.root.style.display === 'none') continue
|
|
|
+ records.push([key, record])
|
|
|
+ }
|
|
|
+ let index = 0
|
|
|
+ const step = () => {
|
|
|
+ if (generation !== entranceReplayGeneration) return
|
|
|
+ const end = Math.min(index + 24, records.length)
|
|
|
+ for (; index < end; index += 1) applyEntrance(records[index][1].root, records[index][0])
|
|
|
+ if (index >= records.length) return
|
|
|
+ if (typeof window !== 'undefined' && typeof window.requestAnimationFrame === 'function') {
|
|
|
+ window.requestAnimationFrame(step)
|
|
|
+ } else if (typeof window !== 'undefined' && window.setTimeout) {
|
|
|
+ window.setTimeout(step, 16)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ step()
|
|
|
+}
|
|
|
+
|
|
|
let hostRecord = null
|
|
|
let postRenderRemove = null
|
|
|
/** 聚合徽章节点池:groupKey → { root, countEl }。 */
|