()
| 375 | echoes.push(echo); |
| 376 | }; |
| 377 | const refreshMoving = () => { |
| 378 | const next = [...flowParts(page), headElement]; |
| 379 | if ( |
| 380 | next.length === moving.length && |
| 381 | next.every((element, index) => element === moving[index]) |
| 382 | ) { |
| 383 | return; |
| 384 | } |
| 385 | moving |
| 386 | .filter((element) => !next.includes(element)) |
| 387 | .forEach((element) => |
| 388 | applyStyle(element, { |
| 389 | transform: null, |
| 390 | transition: null, |
| 391 | 'will-change': null, |
| 392 | }), |
| 393 | ); |
| 394 | const added = next.filter((element) => !moving.includes(element)); |
| 395 | moving = next; |
| 396 | if (!shown.transform) { |
| 397 | added.forEach((element) => applyStyle(element, shown)); |
| 398 | return; |
| 399 | } |
| 400 | added.forEach((element) => |
| 401 | applyStyle(element, { ...shown, transition: 'none' }), |
| 402 | ); |
| 403 | headElement.getBoundingClientRect(); |
| 404 | added.forEach((element) => { |
| 405 | applyStyle(element, { transition: shown.transition ?? null }); |
| 406 | followHead(element); |
| 407 | }); |
| 408 | }; |
| 409 | refreshMoving(); |
| 410 | const isStanding = (node: Node) => |
| 411 | node instanceof Element && |
no test coverage detected