@neo4j-nvl/interaction-handlers 0.2.63 → 0.2.64-6c26dbdc

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.
@@ -1,7 +1,8 @@
1
1
  const marquee = {
2
- frameWidth: 2,
2
+ frameWidth: 3,
3
3
  frameColor: '#a9a9a9',
4
4
  color: '#e0e0e0',
5
+ lineDash: [10, 15],
5
6
  opacity: 0.5
6
7
  };
7
8
  export class OverlayRenderer {
@@ -57,8 +58,10 @@ export class OverlayRenderer {
57
58
  ctx.lineWidth = marquee.frameWidth * devicePixelRatio;
58
59
  ctx.fillStyle = marquee.color;
59
60
  ctx.globalAlpha = marquee.opacity;
61
+ ctx.setLineDash(marquee.lineDash);
60
62
  ctx.stroke();
61
63
  ctx.fill();
64
+ ctx.restore();
62
65
  }
63
66
  drawLasso(points, stroke, fill) {
64
67
  const { ctx } = this;
@@ -81,10 +84,10 @@ export class OverlayRenderer {
81
84
  }
82
85
  const devicePixelRatio = window.devicePixelRatio || 1;
83
86
  ctx.strokeStyle = marquee.frameColor;
84
- ctx.setLineDash([10, 15]);
85
- ctx.lineWidth = 3 * devicePixelRatio;
87
+ ctx.setLineDash(marquee.lineDash);
88
+ ctx.lineWidth = marquee.frameWidth * devicePixelRatio;
86
89
  ctx.fillStyle = marquee.color;
87
- ctx.globalAlpha = 0.5;
90
+ ctx.globalAlpha = marquee.opacity;
88
91
  if (stroke) {
89
92
  ctx.stroke();
90
93
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neo4j-nvl/interaction-handlers",
3
- "version": "0.2.63",
3
+ "version": "0.2.64-6c26dbdc",
4
4
  "license": "SEE LICENSE IN 'Neo4j Early Access Agreement - Visualization Library.pdf'",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -9,7 +9,6 @@
9
9
  "lib"
10
10
  ],
11
11
  "scripts": {
12
- "prebuild": "rm -rf lib/",
13
12
  "build": "tsc",
14
13
  "test": "jest",
15
14
  "prepack": "cp ../../Neo4j\\ Early\\ Access\\ Agreement\\ -\\ Visualization\\ Library.pdf ./",
@@ -22,9 +21,10 @@
22
21
  "tsconfig": "./tsconfig.json"
23
22
  },
24
23
  "engines": {
25
- "yarn": "^1.10.1"
24
+ "yarn": "^4.1.1"
26
25
  },
27
26
  "dependencies": {
27
+ "@neo4j-nvl/core": "^0.2.63-8f4a46dc",
28
28
  "concaveman": "^1.2.1",
29
29
  "lodash": "4.17.21"
30
30
  },
@@ -32,6 +32,13 @@
32
32
  "@testing-library/jest-dom": "^5.16.5",
33
33
  "@testing-library/react": "^13.4.0",
34
34
  "@types/concaveman": "1.1.6",
35
- "@types/lodash": "4.14.202"
36
- }
37
- }
35
+ "@types/lodash": "4.14.202",
36
+ "jest": "^29.7.0",
37
+ "typescript": "^5.4.5"
38
+ },
39
+ "peerDependencies": {
40
+ "jest": "*",
41
+ "typescript": "*"
42
+ },
43
+ "stableVersion": "0.2.64"
44
+ }