force-graph 1.49.4 → 1.49.6
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/README.md +1 -1
- package/dist/force-graph.d.ts +2 -1
- package/dist/force-graph.js +6 -3
- package/dist/force-graph.js.map +1 -1
- package/dist/force-graph.min.js +2 -2
- package/dist/force-graph.mjs +3 -0
- package/example/auto-colored/index.html +1 -1
- package/example/basic/index.html +1 -1
- package/example/beeswarm/index.html +1 -1
- package/example/build-a-graph/index.html +1 -1
- package/example/click-to-focus/index.html +1 -1
- package/example/collision-detection/index.html +1 -1
- package/example/curved-links/index.html +1 -1
- package/example/curved-links-computed-curvature/index.html +1 -1
- package/example/custom-node-shape/index.html +1 -1
- package/example/dag-yarn/index.html +2 -2
- package/example/dagre/index.html +1 -1
- package/example/dash-odd-links/index.html +1 -1
- package/example/directional-links-arrows/index.html +1 -1
- package/example/directional-links-particles/index.html +1 -1
- package/example/dynamic/index.html +1 -1
- package/example/emit-particles/index.html +1 -1
- package/example/expandable-nodes/index.html +1 -1
- package/example/expandable-tree/index.html +1 -1
- package/example/fit-to-canvas/index.html +1 -1
- package/example/fix-dragged-nodes/index.html +1 -1
- package/example/highlight/index.html +1 -1
- package/example/huge-1M/index.html +1 -1
- package/example/img-nodes/index.html +1 -1
- package/example/large-graph/index.html +1 -1
- package/example/load-json/index.html +1 -1
- package/example/medium-graph/index.html +1 -1
- package/example/move-viewport/index.html +1 -1
- package/example/multi-selection/index.html +1 -1
- package/example/responsive/index.html +1 -1
- package/example/text-links/index.html +1 -1
- package/example/text-nodes/index.html +1 -1
- package/example/tree/index.html +1 -1
- package/package.json +9 -8
- package/src/force-graph.js +4 -0
package/dist/force-graph.mjs
CHANGED
|
@@ -1539,6 +1539,9 @@ var forceGraph = Kapsule({
|
|
|
1539
1539
|
|
|
1540
1540
|
// Handle click/touch events on nodes/links
|
|
1541
1541
|
container.addEventListener('pointerup', function (ev) {
|
|
1542
|
+
if (!state.isPointerPressed) {
|
|
1543
|
+
return; // don't trigger click events if pointer is not pressed on the canvas
|
|
1544
|
+
}
|
|
1542
1545
|
state.isPointerPressed = false;
|
|
1543
1546
|
if (state.isPointerDragging) {
|
|
1544
1547
|
state.isPointerDragging = false;
|
package/example/basic/index.html
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
<script src="//bundle.run/@yarnpkg/lockfile@1.1.0"></script>
|
|
5
5
|
|
|
6
|
-
<script src="//
|
|
6
|
+
<script src="//cdn.jsdelivr.net/npm/force-graph"></script>
|
|
7
7
|
<!--<script src="../../dist/force-graph.js"></script>-->
|
|
8
8
|
</head>
|
|
9
9
|
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
.d3AlphaDecay(0.02)
|
|
66
66
|
.d3VelocityDecay(0.3);
|
|
67
67
|
|
|
68
|
-
fetch('//
|
|
68
|
+
fetch('//cdn.jsdelivr.net/npm/d3@5.9.7/yarn.lock')
|
|
69
69
|
.then(r => r.text())
|
|
70
70
|
.then(text => {
|
|
71
71
|
const yarnlock = _yarnpkg_lockfile.parse(text);
|
package/example/dagre/index.html
CHANGED
package/example/tree/index.html
CHANGED
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "force-graph",
|
|
3
|
-
"version": "1.49.
|
|
3
|
+
"version": "1.49.6",
|
|
4
4
|
"description": "2D force-directed graph rendered on HTML5 canvas",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"unpkg": "dist/force-graph.min.js",
|
|
7
|
+
"jsdelivr": "dist/force-graph.min.js",
|
|
7
8
|
"main": "dist/force-graph.mjs",
|
|
8
9
|
"module": "dist/force-graph.mjs",
|
|
9
10
|
"types": "src/index.d.ts",
|
|
@@ -58,24 +59,24 @@
|
|
|
58
59
|
"d3-scale-chromatic": "1 - 3",
|
|
59
60
|
"d3-selection": "2 - 3",
|
|
60
61
|
"d3-zoom": "2 - 3",
|
|
61
|
-
"float-tooltip": "^1.
|
|
62
|
+
"float-tooltip": "^1.7",
|
|
62
63
|
"index-array-by": "1",
|
|
63
64
|
"kapsule": "^1.16",
|
|
64
65
|
"lodash-es": "4"
|
|
65
66
|
},
|
|
66
67
|
"devDependencies": {
|
|
67
|
-
"@babel/core": "^7.
|
|
68
|
-
"@babel/preset-env": "^7.
|
|
68
|
+
"@babel/core": "^7.27.1",
|
|
69
|
+
"@babel/preset-env": "^7.27.2",
|
|
69
70
|
"@rollup/plugin-babel": "^6.0.4",
|
|
70
71
|
"@rollup/plugin-commonjs": "^28.0.3",
|
|
71
|
-
"@rollup/plugin-node-resolve": "^16.0.
|
|
72
|
+
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
72
73
|
"@rollup/plugin-terser": "^0.4.4",
|
|
73
74
|
"postcss": "^8.5.3",
|
|
74
75
|
"rimraf": "^6.0.1",
|
|
75
|
-
"rollup": "^4.
|
|
76
|
-
"rollup-plugin-dts": "^6.
|
|
76
|
+
"rollup": "^4.40.2",
|
|
77
|
+
"rollup-plugin-dts": "^6.2.1",
|
|
77
78
|
"rollup-plugin-postcss": "^4.0.2",
|
|
78
|
-
"typescript": "^5.8.
|
|
79
|
+
"typescript": "^5.8.3"
|
|
79
80
|
},
|
|
80
81
|
"engines": {
|
|
81
82
|
"node": ">=12"
|
package/src/force-graph.js
CHANGED
|
@@ -547,6 +547,10 @@ export default Kapsule({
|
|
|
547
547
|
|
|
548
548
|
// Handle click/touch events on nodes/links
|
|
549
549
|
container.addEventListener('pointerup', ev => {
|
|
550
|
+
if (!state.isPointerPressed) {
|
|
551
|
+
return; // don't trigger click events if pointer is not pressed on the canvas
|
|
552
|
+
}
|
|
553
|
+
|
|
550
554
|
state.isPointerPressed = false;
|
|
551
555
|
if (state.isPointerDragging) {
|
|
552
556
|
state.isPointerDragging = false;
|