File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
11321144function rootBounds ( snapshot ) {
You can’t perform that action at this time.
0 commit comments