@jjlmoya/utils-tabletop 1.8.0 → 1.9.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jjlmoya/utils-tabletop",
3
- "version": "1.8.0",
3
+ "version": "1.9.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -48,7 +48,7 @@ function drawSegments(c: CanvasCtx, segments: WheelSegment[], currentAngle: numb
48
48
  const seg = segments[i];
49
49
  const weight = seg.weight || 1;
50
50
  const sliceAngle = (weight / totalWeight) * 2 * Math.PI;
51
- const startAngle = accumulatedAngle + currentAngle - Math.PI / 2;
51
+ const startAngle = accumulatedAngle + (currentAngle * Math.PI) / 180 - Math.PI / 2;
52
52
  const endAngle = startAngle + sliceAngle;
53
53
 
54
54
  ctx.beginPath();
@@ -1,4 +1,5 @@
1
- import interact from 'interactjs';
1
+ import * as interactModule from 'interactjs';
2
+ const interact = (interactModule.default || interactModule) as unknown as typeof interactModule.default;
2
3
  import { state } from './dom';
3
4
  import { getHighlightPath } from './logic';
4
5
  import { drawConnections } from './renderer';