@krainovsd/graph 0.10.0-rc7 → 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 CHANGED
@@ -1211,6 +1211,10 @@ function getDrawLink() {
1211
1211
  !link.target.x ||
1212
1212
  !link.target.y)
1213
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;
1214
1218
  if (!link.source._visible && !link.target._visible)
1215
1219
  return;
1216
1220
  const id = `${link.target.id}${link.source.id}`;
@@ -1500,6 +1504,8 @@ function getDrawNode(nodeRenders, textRenders) {
1500
1504
  return function drawNode(node, index) {
1501
1505
  if (!this.context || !node.x || !node.y)
1502
1506
  return;
1507
+ if (node.visible != undefined && !node.visible)
1508
+ return;
1503
1509
  let nodeOptions;
1504
1510
  if (this.nodeSettings.cacheOptions && this.nodeOptionsCache[node.id]) {
1505
1511
  nodeOptions = this.nodeOptionsCache[node.id];