@annotorious/annotorious 3.8.0 → 3.8.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@annotorious/annotorious",
3
- "version": "3.8.0",
3
+ "version": "3.8.2",
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",
@@ -46,7 +46,7 @@
46
46
  "@sveltejs/vite-plugin-svelte": "^3.1.2",
47
47
  "@tsconfig/svelte": "^5.0.8",
48
48
  "@types/rbush": "^4.0.0",
49
- "jsdom": "^28.1.0",
49
+ "jsdom": "^29.1.0",
50
50
  "svelte": "^4.2.20",
51
51
  "svelte-preprocess": "^6.0.3",
52
52
  "typescript": "^5.9.3",
@@ -55,10 +55,10 @@
55
55
  "vitest": "^3.2.4"
56
56
  },
57
57
  "dependencies": {
58
- "@annotorious/core": "3.8.0",
58
+ "@annotorious/core": "3.8.2",
59
59
  "dequal": "^2.0.3",
60
60
  "rbush": "^4.0.1",
61
61
  "simplify-js": "^1.2.4",
62
- "uuid": "^13.0.0"
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}
@@ -1,4 +1,4 @@
1
- import type { Bounds, RectangleGeometry } from '../../../model';
1
+ import type { RectangleGeometry } from '../../../model';
2
2
 
3
3
  /**
4
4
  * Rotates a point around a center by the given angle (in rad).