MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / captureVisualPositions

Function captureVisualPositions

src/handlers/editorFileTab.js:329–336  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

327 * @returns {Map<HTMLElement, DOMRect>}
328 */
329function 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.

Callers 1

reorderTabFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected