@krainovsd/graph 0.10.0-rc3 → 0.10.0-rc4

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
@@ -2615,6 +2615,8 @@ function initPointer() {
2615
2615
  let currentLink;
2616
2616
  const checkHighlightNode = this.nodeSettings.highlightByHoverNode && !this.isDragging;
2617
2617
  const checkHighlightLink = this.linkSettings.highlightByHoverLink && !this.isDragging;
2618
+ let highlightNode = true;
2619
+ let highlightLink = true;
2618
2620
  if (checkHighlightNode) {
2619
2621
  currentNode = nodeByPointerGetter({
2620
2622
  areaRect: this.areaRect,
@@ -2622,8 +2624,10 @@ function initPointer() {
2622
2624
  mouseEvent: event,
2623
2625
  nodes: this.nodes,
2624
2626
  });
2627
+ if (currentNode?.highlight != undefined)
2628
+ highlightNode = currentNode.highlight;
2625
2629
  }
2626
- if (currentNode) {
2630
+ if (currentNode && highlightNode) {
2627
2631
  this.area.style.cursor = "pointer";
2628
2632
  }
2629
2633
  else if (checkHighlightLink) {
@@ -2634,7 +2638,9 @@ function initPointer() {
2634
2638
  mouseEvent: event,
2635
2639
  links: this.links,
2636
2640
  });
2637
- if (currentLink) {
2641
+ if (currentLink?.highlight != undefined)
2642
+ highlightLink = currentLink?.highlight;
2643
+ if (currentLink && highlightLink) {
2638
2644
  this.area.style.cursor = "pointer";
2639
2645
  }
2640
2646
  else {
@@ -2644,7 +2650,7 @@ function initPointer() {
2644
2650
  else {
2645
2651
  this.area.style.cursor = "default";
2646
2652
  }
2647
- if (currentNode && this.highlightedNode !== currentNode) {
2653
+ if (currentNode && highlightNode && this.highlightedNode !== currentNode) {
2648
2654
  this.highlightedNode = currentNode;
2649
2655
  this.highlightedLink = null;
2650
2656
  this.highlightedNeighbors = new Set(this.highlightedNode?.neighbors ?? []);
@@ -2655,6 +2661,7 @@ function initPointer() {
2655
2661
  });
2656
2662
  }
2657
2663
  else if (currentLink &&
2664
+ highlightLink &&
2658
2665
  checkType(currentLink.source, lodash.isObject(currentLink.source)) &&
2659
2666
  checkType(currentLink.target, lodash.isObject(currentLink.target)) &&
2660
2667
  this.highlightedLink !== currentLink) {