@pipelex/mthds-ui 0.6.3 → 0.6.4
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.
|
@@ -2116,13 +2116,12 @@ function GraphViewer(props) {
|
|
|
2116
2116
|
return (_b2 = (_a2 = initialDirection != null ? initialDirection : config.direction) != null ? _a2 : DEFAULT_GRAPH_CONFIG.direction) != null ? _b2 : GRAPH_DIRECTION.TB;
|
|
2117
2117
|
}
|
|
2118
2118
|
);
|
|
2119
|
-
const [showControllers, setShowControllers] = React7.useState(
|
|
2120
|
-
() => {
|
|
2121
|
-
var _a2, _b2;
|
|
2122
|
-
return (_b2 = (_a2 = initialShowControllers != null ? initialShowControllers : config.showControllers) != null ? _a2 : DEFAULT_GRAPH_CONFIG.showControllers) != null ? _b2 : false;
|
|
2123
|
-
}
|
|
2124
|
-
);
|
|
2125
2119
|
const effectiveFoldMode = (_b = (_a = initialFoldMode != null ? initialFoldMode : config.foldMode) != null ? _a : DEFAULT_GRAPH_CONFIG.foldMode) != null ? _b : FOLD_MODE.EXPANDED;
|
|
2120
|
+
const [showControllers, setShowControllers] = React7.useState(() => {
|
|
2121
|
+
var _a2, _b2;
|
|
2122
|
+
if (effectiveFoldMode === FOLD_MODE.FOLDED) return true;
|
|
2123
|
+
return (_b2 = (_a2 = initialShowControllers != null ? initialShowControllers : config.showControllers) != null ? _a2 : DEFAULT_GRAPH_CONFIG.showControllers) != null ? _b2 : false;
|
|
2124
|
+
});
|
|
2126
2125
|
const foldModeRef = React7.useRef(effectiveFoldMode);
|
|
2127
2126
|
foldModeRef.current = effectiveFoldMode;
|
|
2128
2127
|
const containerRef = React7.useRef(null);
|
|
@@ -2305,6 +2304,10 @@ function GraphViewer(props) {
|
|
|
2305
2304
|
foldedRef.current = seedSet;
|
|
2306
2305
|
skipNextFoldEffectRef.current = seedSet.size > 0;
|
|
2307
2306
|
prevFoldSizeRef.current = seedSet.size;
|
|
2307
|
+
if (seedSet.size > 0 && !showControllersRef.current) {
|
|
2308
|
+
setShowControllers(true);
|
|
2309
|
+
showControllersRef.current = true;
|
|
2310
|
+
}
|
|
2308
2311
|
const folded = seedSet.size > 0 && analysis ? applyFolds(
|
|
2309
2312
|
{ nodes: graphData.nodes, edges: graphData.edges },
|
|
2310
2313
|
analysis,
|