force-graph 1.46.0 → 1.47.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/README.md +1 -2
- package/dist/force-graph.d.ts +4 -6
- package/dist/force-graph.js +13 -5
- package/dist/force-graph.js.map +1 -1
- package/dist/force-graph.min.js +2 -2
- package/example/auto-colored/index.html +1 -2
- package/example/basic/index.html +1 -1
- package/example/beeswarm/index.html +1 -2
- package/example/build-a-graph/index.html +1 -2
- package/example/click-to-focus/index.html +1 -1
- package/example/collision-detection/index.html +1 -2
- package/example/curved-links/index.html +1 -2
- package/example/curved-links-computed-curvature/index.html +1 -2
- package/example/custom-node-shape/index.html +1 -2
- package/example/dag-yarn/index.html +2 -3
- package/example/dagre/index.html +1 -1
- package/example/dash-odd-links/index.html +1 -1
- package/example/directional-links-arrows/index.html +1 -2
- package/example/directional-links-particles/index.html +1 -2
- package/example/dynamic/index.html +1 -1
- package/example/emit-particles/index.html +1 -2
- package/example/expandable-nodes/index.html +1 -1
- package/example/expandable-tree/index.html +1 -2
- package/example/fit-to-canvas/index.html +1 -2
- package/example/fix-dragged-nodes/index.html +1 -2
- package/example/highlight/index.html +1 -1
- package/example/huge-1M/index.html +1 -2
- package/example/img-nodes/index.html +1 -2
- package/example/large-graph/index.html +1 -2
- package/example/load-json/index.html +1 -2
- package/example/medium-graph/index.html +1 -1
- package/example/move-viewport/index.html +1 -2
- package/example/multi-selection/index.html +1 -2
- package/example/responsive/index.html +1 -2
- package/example/text-links/index.html +1 -2
- package/example/text-nodes/index.html +1 -2
- package/example/tree/index.html +2 -3
- package/package.json +5 -5
- package/src/index.d.ts +3 -5
package/README.md
CHANGED
package/dist/force-graph.d.ts
CHANGED
|
@@ -36,8 +36,8 @@ interface ForceFn<N = NodeObject> {
|
|
|
36
36
|
[key: string]: any;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
(element: HTMLElement)
|
|
39
|
+
declare class ForceGraphGeneric<ChainableInstance, N extends NodeObject = NodeObject, L extends LinkObject<N> = LinkObject<N>> {
|
|
40
|
+
constructor(element: HTMLElement);
|
|
41
41
|
resetProps(): ChainableInstance;
|
|
42
42
|
_destructor(): void;
|
|
43
43
|
|
|
@@ -190,8 +190,6 @@ interface ForceGraphGenericInstance<ChainableInstance, N extends NodeObject = No
|
|
|
190
190
|
graph2ScreenCoords(x: number, y: number): { x: number, y: number };
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
-
|
|
193
|
+
declare class ForceGraph<NodeType = NodeObject, LinkType = LinkObject<NodeType>> extends ForceGraphGeneric<ForceGraph<NodeType, LinkType>, NodeType, LinkType> {}
|
|
194
194
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
export { type CanvasCustomRenderFn, type CanvasCustomRenderModeFn, type CanvasPointerAreaPaintFn, type ForceGraphGenericInstance, type ForceGraphInstance, type GraphData, type LinkObject, type NodeObject, ForceGraph as default };
|
|
195
|
+
export { type CanvasCustomRenderFn, type CanvasCustomRenderModeFn, type CanvasPointerAreaPaintFn, ForceGraphGeneric, type GraphData, type LinkObject, type NodeObject, ForceGraph as default };
|
package/dist/force-graph.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Version 1.
|
|
1
|
+
// Version 1.47.0 force-graph - https://github.com/vasturiano/force-graph
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
@@ -5496,8 +5496,15 @@
|
|
|
5496
5496
|
var props = Object.keys(rawProps).map(function (propName) {
|
|
5497
5497
|
return new Prop(propName, rawProps[propName]);
|
|
5498
5498
|
});
|
|
5499
|
-
return function () {
|
|
5500
|
-
var
|
|
5499
|
+
return function KapsuleComp() {
|
|
5500
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
5501
|
+
args[_key] = arguments[_key];
|
|
5502
|
+
}
|
|
5503
|
+
var classMode = !!(this instanceof KapsuleComp ? this.constructor : void 0);
|
|
5504
|
+
var nodeElement = classMode ? args.shift() : undefined;
|
|
5505
|
+
var _args$ = args[0],
|
|
5506
|
+
options = _args$ === void 0 ? {} : _args$;
|
|
5507
|
+
|
|
5501
5508
|
// Holds component state
|
|
5502
5509
|
var state = Object.assign({}, stateInit instanceof Function ? stateInit(options) : stateInit,
|
|
5503
5510
|
// Support plain objects for backwards compatibility
|
|
@@ -5561,8 +5568,8 @@
|
|
|
5561
5568
|
Object.keys(methods).forEach(function (methodName) {
|
|
5562
5569
|
comp[methodName] = function () {
|
|
5563
5570
|
var _methods$methodName;
|
|
5564
|
-
for (var
|
|
5565
|
-
args[
|
|
5571
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
5572
|
+
args[_key2] = arguments[_key2];
|
|
5566
5573
|
}
|
|
5567
5574
|
return (_methods$methodName = methods[methodName]).call.apply(_methods$methodName, [comp, state].concat(args));
|
|
5568
5575
|
};
|
|
@@ -5589,6 +5596,7 @@
|
|
|
5589
5596
|
comp.resetProps(); // Apply all prop defaults
|
|
5590
5597
|
state._rerender = digest; // Expose digest method
|
|
5591
5598
|
|
|
5599
|
+
classMode && nodeElement && comp(nodeElement);
|
|
5592
5600
|
return comp;
|
|
5593
5601
|
};
|
|
5594
5602
|
}
|