@krainovsd/graph 0.10.0-rc6 → 0.10.0-rc8
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/lib/cjs/index.cjs +7 -2
- package/lib/cjs/index.cjs.map +1 -1
- package/lib/esm/module/GraphCanvas/constants/force-settings.js +0 -1
- package/lib/esm/module/GraphCanvas/constants/force-settings.js.map +1 -1
- package/lib/esm/module/GraphCanvas/slices/draw-links.js +4 -0
- package/lib/esm/module/GraphCanvas/slices/draw-links.js.map +1 -1
- package/lib/esm/module/GraphCanvas/slices/draw-nodes.js +2 -0
- package/lib/esm/module/GraphCanvas/slices/draw-nodes.js.map +1 -1
- package/lib/esm/module/GraphCanvas/slices/init-simulation.js +1 -1
- package/lib/esm/module/GraphCanvas/slices/init-simulation.js.map +1 -1
- package/lib/index.d.ts +2 -1
- package/package.json +1 -1
package/lib/cjs/index.cjs
CHANGED
|
@@ -30,7 +30,6 @@ const FORCE_SETTINGS = {
|
|
|
30
30
|
collideIterations: 2,
|
|
31
31
|
collideOffMax: { links: 0, nodes: 0 },
|
|
32
32
|
chargeStrength: -40,
|
|
33
|
-
chargeDistanceMax: Infinity,
|
|
34
33
|
chargeDistanceMin: 1,
|
|
35
34
|
xPosition: 0,
|
|
36
35
|
xStrength: 0.1,
|
|
@@ -1212,6 +1211,10 @@ function getDrawLink() {
|
|
|
1212
1211
|
!link.target.x ||
|
|
1213
1212
|
!link.target.y)
|
|
1214
1213
|
return;
|
|
1214
|
+
if ((link.visible != undefined && !link.visible) ||
|
|
1215
|
+
(link.source.visible != undefined && !link.source.visible) ||
|
|
1216
|
+
(link.target.visible != undefined && !link.target.visible))
|
|
1217
|
+
return;
|
|
1215
1218
|
if (!link.source._visible && !link.target._visible)
|
|
1216
1219
|
return;
|
|
1217
1220
|
const id = `${link.target.id}${link.source.id}`;
|
|
@@ -1501,6 +1504,8 @@ function getDrawNode(nodeRenders, textRenders) {
|
|
|
1501
1504
|
return function drawNode(node, index) {
|
|
1502
1505
|
if (!this.context || !node.x || !node.y)
|
|
1503
1506
|
return;
|
|
1507
|
+
if (node.visible != undefined && !node.visible)
|
|
1508
|
+
return;
|
|
1504
1509
|
let nodeOptions;
|
|
1505
1510
|
if (this.nodeSettings.cacheOptions && this.nodeOptionsCache[node.id]) {
|
|
1506
1511
|
nodeOptions = this.nodeOptionsCache[node.id];
|
|
@@ -2297,7 +2302,7 @@ function initSimulationForces() {
|
|
|
2297
2302
|
if (this.forceSettings.forces && this.forceSettings.chargeForce) {
|
|
2298
2303
|
this.simulation.force("charge", d3Force.forceManyBody()
|
|
2299
2304
|
.strength(this.forceSettings.chargeStrength)
|
|
2300
|
-
.distanceMax(
|
|
2305
|
+
.distanceMax(Infinity)
|
|
2301
2306
|
.distanceMin(this.forceSettings.chargeDistanceMin));
|
|
2302
2307
|
}
|
|
2303
2308
|
if (this.forceSettings.forces && this.forceSettings.centerForce) {
|