Skip to content

Commit 488ef3c

Browse files
committed
Expand prompt tap fallbacks
1 parent fcfc640 commit 488ef3c

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

scripts/integration/cli.mjs

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,14 +1119,26 @@ function openButtonCandidateNormalizedPoints(snapshot) {
11191119
}
11201120
const x = point.x / bounds.width;
11211121
const y = point.y / bounds.height;
1122+
return candidateNormalizedTransforms(x, y);
1123+
}
1124+
1125+
function candidateNormalizedTransforms(x, y) {
11221126
return uniqueUnitPoints([
11231127
{ x, y },
11241128
{ x: y, y: x },
1125-
{ x: y, y: 1 - x },
1126-
{ x: 1 - y, y: x },
11271129
{ x: 1 - x, y },
11281130
{ x, y: 1 - y },
1129-
]).filter((candidate) => candidate.x >= 0 && candidate.y >= 0);
1131+
{ x: 1 - x, y: 1 - y },
1132+
{ x: y, y: 1 - x },
1133+
{ x: 1 - y, y: x },
1134+
{ x: 1 - y, y: 1 - x },
1135+
]).filter(
1136+
(candidate) =>
1137+
candidate.x >= 0 &&
1138+
candidate.x <= 1 &&
1139+
candidate.y >= 0 &&
1140+
candidate.y <= 1,
1141+
);
11301142
}
11311143

11321144
function rootBounds(snapshot) {

0 commit comments

Comments
 (0)