footprint-explainable-ui 0.14.9 → 0.14.11

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.
@@ -840,9 +840,14 @@ function applyOverlay(layout, overlay, colors) {
840
840
  if (le.isLoop) {
841
841
  let loopExecuted = false;
842
842
  if (o?.executionOrder) {
843
- const lastSourceIdx = o.executionOrder.lastIndexOf(le.source);
844
- if (lastSourceIdx >= 0) {
845
- loopExecuted = o.executionOrder.slice(lastSourceIdx + 1).includes(le.target);
843
+ if (le.source === le.target) {
844
+ const count = o.executionOrder.filter((id) => id === le.source).length;
845
+ loopExecuted = count > 1;
846
+ } else {
847
+ const lastSourceIdx = o.executionOrder.lastIndexOf(le.source);
848
+ if (lastSourceIdx >= 0) {
849
+ loopExecuted = o.executionOrder.slice(lastSourceIdx + 1).includes(le.target);
850
+ }
846
851
  }
847
852
  }
848
853
  edges.push({
@@ -854,14 +859,14 @@ function applyOverlay(layout, overlay, colors) {
854
859
  label: le.label ?? "loop",
855
860
  type: "smoothstep",
856
861
  pathOptions: { offset: 60, borderRadius: 20 },
857
- markerEnd: { type: import_react7.MarkerType.ArrowClosed, color: c.edgeLoop, width: 16, height: 16 },
862
+ markerEnd: { type: import_react7.MarkerType.ArrowClosed, color: loopExecuted ? c.edgeActive : c.edgeLoop, width: 16, height: 16 },
858
863
  style: {
859
- stroke: c.edgeLoop,
860
- strokeWidth: loopExecuted ? 3 : 2,
861
- strokeDasharray: "6 3",
864
+ stroke: loopExecuted ? c.edgeActive : c.edgeLoop,
865
+ strokeWidth: loopExecuted ? 4 : 2,
866
+ strokeDasharray: loopExecuted ? void 0 : "6 3",
862
867
  opacity: o && !loopExecuted ? 0.35 : 1
863
868
  },
864
- labelStyle: { fontSize: 10, fontWeight: 700, fill: c.labelLoop },
869
+ labelStyle: { fontSize: 10, fontWeight: 700, fill: loopExecuted ? c.edgeActive : c.labelLoop },
865
870
  animated: loopExecuted,
866
871
  zIndex: 2
867
872
  });