3d-force-graph 1.70.17 → 1.70.19
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/dist/3d-force-graph.common.js +18 -1
- package/dist/3d-force-graph.js +717 -404
- package/dist/3d-force-graph.js.map +1 -1
- package/dist/3d-force-graph.min.js +3 -3
- package/dist/3d-force-graph.module.js +18 -1
- package/example/bloom-effect/index.html +5 -6
- package/example/html-nodes/index.html +6 -4
- package/package.json +10 -10
|
@@ -57,6 +57,7 @@ function _objectSpread2(target) {
|
|
|
57
57
|
return target;
|
|
58
58
|
}
|
|
59
59
|
function _defineProperty(obj, key, value) {
|
|
60
|
+
key = _toPropertyKey(key);
|
|
60
61
|
if (key in obj) {
|
|
61
62
|
Object.defineProperty(obj, key, {
|
|
62
63
|
value: value,
|
|
@@ -94,6 +95,20 @@ function _arrayLikeToArray(arr, len) {
|
|
|
94
95
|
function _nonIterableSpread() {
|
|
95
96
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
96
97
|
}
|
|
98
|
+
function _toPrimitive(input, hint) {
|
|
99
|
+
if (typeof input !== "object" || input === null) return input;
|
|
100
|
+
var prim = input[Symbol.toPrimitive];
|
|
101
|
+
if (prim !== undefined) {
|
|
102
|
+
var res = prim.call(input, hint || "default");
|
|
103
|
+
if (typeof res !== "object") return res;
|
|
104
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
105
|
+
}
|
|
106
|
+
return (hint === "string" ? String : Number)(input);
|
|
107
|
+
}
|
|
108
|
+
function _toPropertyKey(arg) {
|
|
109
|
+
var key = _toPrimitive(arg, "string");
|
|
110
|
+
return typeof key === "symbol" ? key : String(key);
|
|
111
|
+
}
|
|
97
112
|
|
|
98
113
|
function linkKapsule (kapsulePropName, kapsuleType) {
|
|
99
114
|
var dummyK = new kapsuleType(); // To extract defaults
|
|
@@ -183,6 +198,8 @@ var _3dForceGraph = Kapsule({
|
|
|
183
198
|
var controls = state.renderObjs.controls();
|
|
184
199
|
if (controls) {
|
|
185
200
|
controls.enabled = enable;
|
|
201
|
+
// trigger mouseup on re-enable to prevent sticky controls
|
|
202
|
+
enable && controls.domElement && controls.domElement.dispatchEvent(new PointerEvent('pointerup'));
|
|
186
203
|
}
|
|
187
204
|
},
|
|
188
205
|
triggerUpdate: false
|
|
@@ -351,7 +368,7 @@ var _3dForceGraph = Kapsule({
|
|
|
351
368
|
state._dragControls = undefined;
|
|
352
369
|
}
|
|
353
370
|
if (state.enableNodeDrag && state.enablePointerInteraction && state.forceEngine === 'd3') {
|
|
354
|
-
// Can't access node positions
|
|
371
|
+
// Can't access node positions programmatically in ngraph
|
|
355
372
|
var dragControls = state._dragControls = new DragControls_js.DragControls(state.graphData.nodes.map(function (node) {
|
|
356
373
|
return node.__threeObj;
|
|
357
374
|
}).filter(function (obj) {
|