Keep dataflow nodes initialized

This commit is contained in:
2026-07-28 15:51:38 +02:00
parent 61dcfc7a52
commit 2084540ab1
2 changed files with 8 additions and 1 deletions

View File

@@ -14,6 +14,8 @@ const checks = [
[canvas.includes("application/x-govoplan-dataflow-node"), "palette drop handling"],
[canvas.includes("isValidConnection"), "edge validation"],
[canvas.includes("connectionRadius={32}"), "visible connection drop radius"],
[canvas.includes("initialWidth: 180"), "known initial node width"],
[canvas.includes('change.type !== "dimensions"'), "measurement-only change filtering"],
[
moduleEntry.indexOf("@xyflow/react/dist/style.css") <
moduleEntry.indexOf("./styles/dataflow.css"),

View File

@@ -69,6 +69,8 @@ export default function DataflowCanvas({
id: node.id,
type: "dataflow",
position: node.position,
initialWidth: 180,
initialHeight: node.type.startsWith("combine.") ? 64 : 54,
selected: node.id === selectedNodeId,
data: {
label: node.label,
@@ -180,7 +182,10 @@ export default function DataflowCanvas({
onInit={setInstance}
onNodesChange={(changes) => {
if (readOnly) return;
updateNodes(applyNodeChanges(changes, nodes));
const graphChanges = changes.filter((change) => change.type !== "dimensions");
if (graphChanges.length) {
updateNodes(applyNodeChanges(graphChanges, nodes));
}
}}
onEdgesChange={(changes) => {
if (readOnly) return;