@deepnoid/canvas 0.1.81 → 0.1.82

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.
@@ -37,7 +37,7 @@ export const polygonRenderer = {
37
37
  }
38
38
  }
39
39
  if (pointerState?.mousePoint && !engine.getSelectedAnnotation()) {
40
- drawCross(context, pointerState.mousePoint, dw, dh, zoom, lineSize);
40
+ drawCross(context, pointerState.mousePoint, dw, dh, zoom);
41
41
  }
42
42
  },
43
43
  };
@@ -24,7 +24,7 @@ export const rectangleRenderer = {
24
24
  drawNewRectFromPoints(context, renderState.mousePoint, renderState.startMousePoint, zoom, lineSize, color);
25
25
  }
26
26
  if (pointerState?.mousePoint && !engine.getSelectedAnnotation()) {
27
- drawCross(context, pointerState.mousePoint, dw, dh, zoom, lineSize);
27
+ drawCross(context, pointerState.mousePoint, dw, dh, zoom);
28
28
  }
29
29
  },
30
30
  };
@@ -1,2 +1,2 @@
1
1
  import { Point } from '../types';
2
- export declare function drawCross(context: CanvasRenderingContext2D, mousePoint: Point, dw: number, dh: number, zoom: number, drawLineSize: number): void;
2
+ export declare function drawCross(context: CanvasRenderingContext2D, mousePoint: Point, dw: number, dh: number, zoom: number): void;
@@ -1,5 +1,6 @@
1
- export function drawCross(context, mousePoint, dw, dh, zoom, drawLineSize) {
1
+ export function drawCross(context, mousePoint, dw, dh, zoom) {
2
2
  if (mousePoint.x > 0 && mousePoint.y > 0 && mousePoint.x < dw && mousePoint.y < dh) {
3
+ const drawLineSize = 2;
3
4
  if (context)
4
5
  context.lineWidth = (drawLineSize / 2) * (1 / zoom);
5
6
  context?.setLineDash([5]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepnoid/canvas",
3
- "version": "0.1.81",
3
+ "version": "0.1.82",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.cjs",