@bettergi/utils 0.1.23 → 0.1.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/ocr.js +8 -1
  2. package/package.json +1 -1
package/dist/ocr.js CHANGED
@@ -240,7 +240,14 @@ export const findWithinListView = async (condition, listView, retryOptions, samp
240
240
  await sleep(50);
241
241
  await mouseScrollDownLines(scrollLines, lineHeight); // 滚动指定行数
242
242
  }, { maxAttempts, retryInterval });
243
- return isFoundOrReachedBottom ? condition(captureListViewRegion()) : undefined;
243
+ if (isFoundOrReachedBottom) {
244
+ const targetRegion = condition(captureListViewRegion());
245
+ if (targetRegion) {
246
+ const { item1, item2 } = targetRegion.convertPositionToGameCaptureRegion(0, 0);
247
+ Object.assign(targetRegion, { x: item1, y: item2 });
248
+ return targetRegion;
249
+ }
250
+ }
244
251
  };
245
252
  /**
246
253
  * 在列表视图中滚动搜索文本
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bettergi/utils",
3
- "version": "0.1.23",
3
+ "version": "0.1.24",
4
4
  "description": "开发 BetterGI 脚本常用工具集",
5
5
  "type": "module",
6
6
  "author": "Bread Grocery<https://github.com/breadgrocery>",