You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Start checking from index i in the X direction;
1189
+
const pbX =pb[checkPointYIndex]
1190
+
// Get the last column array in the X direction
1191
+
if (checkPointYIndex<0||!pbX) {
1192
+
return1
1193
+
} else {
1194
+
// The width to check is the component width. The end index of the check is checkEndIndex = i + width - 1;
1195
+
// The exit condition for the check is when the end index checkEndIndex is out of bounds (exceeds the end index of pbX).
1196
+
for (let i =0, checkEndIndex =width-1; checkEndIndex<pbX.length; i++, checkEndIndex++) {
1197
+
let adaptorCount =0
1198
+
// Locate the occupied position in the last column
1199
+
for (let k =0; k<width; k++) {
1200
+
// pbX[i + k].el === false indicates that the current matrix point is not occupied. When the width of consecutive unoccupied matrix points equals the component width, the starting point i is available.
0 commit comments