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

Function openButtonCandidatePoints

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

Source from the content-addressed store, hash-verified

1535}
1536
1537function openButtonCandidatePoints(snapshot) {
1538 const point = openButtonPoint(snapshot);
1539 if (!point) {
1540 return [];
1541 }
1542 const bounds = rootBounds(snapshot);
1543 const candidates = [point, { x: point.y, y: point.x }];
1544 if (bounds) {
1545 candidates.push(
1546 { x: bounds.width - point.x, y: point.y },
1547 { x: point.x, y: bounds.height - point.y },
1548 { x: point.y, y: bounds.width - point.x },
1549 { x: bounds.height - point.y, y: point.x },
1550 );
1551 }
1552 return uniquePoints(candidates).filter(
1553 (candidate) => candidate.x >= 0 && candidate.y >= 0,
1554 );
1555}
1556
1557function openButtonCandidateNormalizedPoints(snapshot) {
1558 const point = openButtonPoint(snapshot);

Callers 1

openUrlPromptActionsFunction · 0.85

Calls 3

openButtonPointFunction · 0.85
rootBoundsFunction · 0.85
uniquePointsFunction · 0.85

Tested by

no test coverage detected