(snapshot)
| 1535 | } |
| 1536 | |
| 1537 | function 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 | |
| 1557 | function openButtonCandidateNormalizedPoints(snapshot) { |
| 1558 | const point = openButtonPoint(snapshot); |
no test coverage detected