* Captures where each tab visually is right now (including mid-animation * transforms via WAAPI), so the FLIP delta is calculated from the visual * position rather than the DOM layout position. * @param {HTMLElement} $parent * @returns {Map }
($parent)
| 327 | * @returns {Map<HTMLElement, DOMRect>} |
| 328 | */ |
| 329 | function captureVisualPositions($parent) { |
| 330 | return new Map( |
| 331 | [...$parent.children].map(($child) => [ |
| 332 | $child, |
| 333 | $child.getBoundingClientRect(), |
| 334 | ]), |
| 335 | ); |
| 336 | } |
| 337 | |
| 338 | /** |
| 339 | * Animates the visual change after the DOM order is updated using FLIP. |