@olenbetong/synergi-react 4.1.2 → 4.2.0
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.
|
@@ -177,8 +177,11 @@ function groupLines(segments, minDim) {
|
|
|
177
177
|
let lines = [];
|
|
178
178
|
let maxAngle = (3 * Math.PI) / 180;
|
|
179
179
|
let maxOffset = minDim * 0.015;
|
|
180
|
-
|
|
181
|
-
|
|
180
|
+
// Count from the data, not `rows`: OpenCV 4 returns an N×1 matrix of segments and
|
|
181
|
+
// OpenCV 5 a 1×N one, and the loader may end up with either build.
|
|
182
|
+
let data = segments.data32S;
|
|
183
|
+
for (let i = 0; i + 3 < data.length; i += 4) {
|
|
184
|
+
let [x1, y1, x2, y2] = data.subarray(i, i + 4);
|
|
182
185
|
let len = Math.hypot(x2 - x1, y2 - y1);
|
|
183
186
|
// Normal of the segment, folded into [0, π)
|
|
184
187
|
let theta = Math.atan2(x1 - x2, y2 - y1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@olenbetong/synergi-react",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"description": "Standalone React component for SynergiWeb and Partner Portal",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -39,6 +39,11 @@
|
|
|
39
39
|
"@emotion/styled": "^11.14.1",
|
|
40
40
|
"@mui/icons-material": "9.4.0",
|
|
41
41
|
"@mui/material": "9.4.0",
|
|
42
|
+
"@olenbetong/appframe-core": "2.14.0",
|
|
43
|
+
"@olenbetong/appframe-data": "1.7.2",
|
|
44
|
+
"@olenbetong/appframe-ds": "1.3.1",
|
|
45
|
+
"@olenbetong/appframe-mui": "7.0.4",
|
|
46
|
+
"@olenbetong/appframe-react": "2.2.2",
|
|
42
47
|
"clsx": "^2.1.1",
|
|
43
48
|
"filepond": "^4.32.12",
|
|
44
49
|
"filepond-plugin-file-poster": "^2.5.2",
|
|
@@ -53,12 +58,7 @@
|
|
|
53
58
|
"react": "19.3.0",
|
|
54
59
|
"react-dom": "19.3.0",
|
|
55
60
|
"react-pdf": "10.5.0",
|
|
56
|
-
"zxing-wasm": "3.1.4"
|
|
57
|
-
"@olenbetong/appframe-ds": "1.3.0",
|
|
58
|
-
"@olenbetong/appframe-core": "2.14.0",
|
|
59
|
-
"@olenbetong/appframe-data": "1.7.2",
|
|
60
|
-
"@olenbetong/appframe-mui": "7.0.3",
|
|
61
|
-
"@olenbetong/appframe-react": "2.2.1"
|
|
61
|
+
"zxing-wasm": "3.1.4"
|
|
62
62
|
},
|
|
63
63
|
"repository": {
|
|
64
64
|
"type": "git",
|
|
@@ -203,8 +203,11 @@ function groupLines(segments: any, minDim: number): { vertical: Line[]; horizont
|
|
|
203
203
|
let maxAngle = (3 * Math.PI) / 180;
|
|
204
204
|
let maxOffset = minDim * 0.015;
|
|
205
205
|
|
|
206
|
-
|
|
207
|
-
|
|
206
|
+
// Count from the data, not `rows`: OpenCV 4 returns an N×1 matrix of segments and
|
|
207
|
+
// OpenCV 5 a 1×N one, and the loader may end up with either build.
|
|
208
|
+
let data: Int32Array = segments.data32S;
|
|
209
|
+
for (let i = 0; i + 3 < data.length; i += 4) {
|
|
210
|
+
let [x1, y1, x2, y2] = data.subarray(i, i + 4);
|
|
208
211
|
let len = Math.hypot(x2 - x1, y2 - y1);
|
|
209
212
|
// Normal of the segment, folded into [0, π)
|
|
210
213
|
let theta = Math.atan2(x1 - x2, y2 - y1);
|