@aspiresys/visor 1.3.1 → 1.3.2

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.
package/dist/matcher.js CHANGED
@@ -117,6 +117,7 @@ function findAllInspectorMatches(screen, template, confidence = 0.8) {
117
117
  }
118
118
  }
119
119
  }
120
+ matches.sort((a, b) => b.confidence - a.confidence);
120
121
  const filtered = [];
121
122
  for (const match of matches) {
122
123
  const tooClose = filtered.some((existing) => {
@@ -128,6 +129,12 @@ function findAllInspectorMatches(screen, template, confidence = 0.8) {
128
129
  filtered.push(match);
129
130
  }
130
131
  }
132
+ filtered.sort((a, b) => {
133
+ if (a.y !== b.y) {
134
+ return a.y - b.y;
135
+ }
136
+ return a.x - b.x;
137
+ });
131
138
  result.delete();
132
139
  return filtered;
133
140
  }
@@ -121,7 +121,7 @@ saveBtn.addEventListener("click",
121
121
  selectedTemplatePath = filePath;
122
122
  currentTemplate.textContent = fileName;
123
123
  currentTemplate.title = filePath;
124
- matchResult.textContent = "<b>No Match Tested</b>";
124
+ matchResult.innerHTML = "<b>No Match Tested</b>";
125
125
  ctx.drawImage(
126
126
  image,
127
127
  0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aspiresys/visor",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
package/readme.md CHANGED
@@ -38,7 +38,7 @@ Visor is designed for automating desktop workflows using visual interactions ins
38
38
 
39
39
  ---
40
40
 
41
- ## What's New in 1.3.0
41
+ ## What's New in 1.3.x
42
42
 
43
43
  * Region class API
44
44
  * Region image matching
Binary file
Binary file
Binary file