MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / rootBounds

Function rootBounds

scripts/integration/cli.mjs:1587–1600  ·  view source on GitHub ↗
(snapshot)

Source from the content-addressed store, hash-verified

1585}
1586
1587function rootBounds(snapshot) {
1588 const match = snapshot.match(
1589 /Application(?:\s+#[^:\n]+)?:?.*?@([0-9.]+),([0-9.]+)\s+([0-9.]+)x([0-9.]+)/,
1590 );
1591 if (!match) {
1592 return null;
1593 }
1594 return {
1595 x: Number(match[1]),
1596 y: Number(match[2]),
1597 width: Number(match[3]),
1598 height: Number(match[4]),
1599 };
1600}
1601
1602function uniquePoints(points) {
1603 const seen = new Set();

Callers 3

buttonCandidatePointsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected