@annotorious/annotorious 3.8.0 → 3.8.1
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/annotorious.es.js +1610 -1605
- package/dist/annotorious.es.js.map +1 -1
- package/dist/annotorious.js +1 -1
- package/dist/annotorious.js.map +1 -1
- package/package.json +3 -3
- package/src/annotation/editors/rectangle/RectangleEditor.svelte +5 -1
- package/src/annotation/editors/rectangle/rotationUtils.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@annotorious/annotorious",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.1",
|
|
4
4
|
"description": "Add image annotation functionality to any web page with a few lines of JavaScript",
|
|
5
5
|
"author": "Rainer Simon",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
@@ -55,10 +55,10 @@
|
|
|
55
55
|
"vitest": "^3.2.4"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@annotorious/core": "3.8.
|
|
58
|
+
"@annotorious/core": "3.8.1",
|
|
59
59
|
"dequal": "^2.0.3",
|
|
60
60
|
"rbush": "^4.0.1",
|
|
61
61
|
"simplify-js": "^1.2.4",
|
|
62
|
-
"uuid": "^
|
|
62
|
+
"uuid": "^14.0.0"
|
|
63
63
|
}
|
|
64
64
|
}
|
|
@@ -47,6 +47,10 @@
|
|
|
47
47
|
// Snap to 10 degrees if SHIFT is held
|
|
48
48
|
if (shiftPressed)
|
|
49
49
|
rot = snapAngle(rot);
|
|
50
|
+
|
|
51
|
+
// Normalizes the angle to be strictly between 0 and 2π
|
|
52
|
+
const TWO_PI = 2 * Math.PI;
|
|
53
|
+
rot = ((rot % TWO_PI) + TWO_PI) % TWO_PI;
|
|
50
54
|
} else if (handle === 'SHAPE') {
|
|
51
55
|
// Moving the entire shape - translate it without rotation change
|
|
52
56
|
x += dx;
|
|
@@ -172,7 +176,7 @@
|
|
|
172
176
|
</defs>
|
|
173
177
|
|
|
174
178
|
<!-- Rotation handle -->
|
|
175
|
-
<g>
|
|
179
|
+
<g class="a9s-rotation-handle-group">
|
|
176
180
|
<line
|
|
177
181
|
class="a9s-rotation-handle-line-bg"
|
|
178
182
|
x1={rotatedCorners[0][0] + (rotatedCorners[1][0] - rotatedCorners[0][0]) / 2}
|