@opentrace/components 0.1.1-rc.11 → 0.1.1-rc.14

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.
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
4
  const t = require("react");
5
- const useHighlights = require("./useHighlights-D6Jl6Woe.cjs");
5
+ const useHighlights = require("./useHighlights-Xr_gYCcU.cjs");
6
6
  var _documentCurrentScript = typeof document !== "undefined" ? document.currentScript : null;
7
7
  function _toPrimitive$1(t2, r) {
8
8
  if ("object" != typeof t2 || !t2) return t2;
@@ -5547,21 +5547,24 @@ function useGraphVisuals(graph, layoutReady, visualState, layoutConfig, _degreeM
5547
5547
  return attrs;
5548
5548
  });
5549
5549
  const defaultEdgeSize = isLargeGraph ? EDGE_SIZE_DEFAULT_LINE : EDGE_SIZE_DEFAULT;
5550
- graph.updateEachEdgeAttributes((_id, attrs, source, target) => {
5551
- const linkKey = `${source}-${target}`;
5552
- const isHighlighted = highlightLinks.has(linkKey);
5553
- const baseColor = getLinkColor(attrs.label);
5554
- if (hasHighlight) {
5555
- attrs.color = isHighlighted ? baseColor : dimColor(baseColor, EDGE_OPACITY_DIMMED);
5556
- attrs.size = isHighlighted ? EDGE_SIZE_HIGHLIGHTED : EDGE_SIZE_DIMMED;
5557
- attrs.zIndex = isHighlighted ? 1 : 0;
5558
- } else {
5559
- attrs.color = dimColor(baseColor, EDGE_OPACITY_DEFAULT);
5560
- attrs.size = defaultEdgeSize;
5561
- attrs.zIndex = 0;
5562
- }
5563
- return attrs;
5564
- });
5550
+ graph.updateEachEdgeAttributes(
5551
+ (_id, attrs, source, target) => {
5552
+ const linkKey = `${source}-${target}`;
5553
+ const isHighlighted = highlightLinks.has(linkKey);
5554
+ const baseColor = getLinkColor(attrs.label);
5555
+ if (hasHighlight) {
5556
+ attrs.color = isHighlighted ? baseColor : dimColor(baseColor, EDGE_OPACITY_DIMMED);
5557
+ attrs.size = isHighlighted ? EDGE_SIZE_HIGHLIGHTED : EDGE_SIZE_DIMMED;
5558
+ attrs.zIndex = isHighlighted ? 1 : 0;
5559
+ } else {
5560
+ attrs.color = dimColor(baseColor, EDGE_OPACITY_DEFAULT);
5561
+ attrs.size = defaultEdgeSize;
5562
+ attrs.zIndex = 0;
5563
+ }
5564
+ return attrs;
5565
+ },
5566
+ { attributes: ["zIndex"] }
5567
+ );
5565
5568
  }, [graph, layoutReady, visualState, layoutConfig, isLargeGraph]);
5566
5569
  }
5567
5570
  function c(r, n2) {