diff --git a/.changeset/few-icons-draw.md b/.changeset/few-icons-draw.md new file mode 100644 index 00000000..a7a72c1a --- /dev/null +++ b/.changeset/few-icons-draw.md @@ -0,0 +1,8 @@ +--- +'@antv/xflow-core': patch +'@antv/xflow': patch +'@antv/xflow-extension': patch +'@antv/xflow-hook': patch +--- + +fix: typo in node and edge command visible update diff --git a/packages/xflow-core/src/command-contributions/edge/edge-update.ts b/packages/xflow-core/src/command-contributions/edge/edge-update.ts index 604542f6..4a469dd7 100644 --- a/packages/xflow-core/src/command-contributions/edge/edge-update.ts +++ b/packages/xflow-core/src/command-contributions/edge/edge-update.ts @@ -93,7 +93,7 @@ export class UpdateEdgeCommand implements ICommand { // 默认更新edge的第一个label await updateEdgeLabelService(x6Edge, edgeConfig, options) } - if (isBoolean(edgeConfig?.visble)) { + if (isBoolean(edgeConfig?.visible)) { x6Edge.setVisible(edgeConfig?.visible) } diff --git a/packages/xflow-core/src/command-contributions/node/node-update.ts b/packages/xflow-core/src/command-contributions/node/node-update.ts index fe53c247..90bce9aa 100644 --- a/packages/xflow-core/src/command-contributions/node/node-update.ts +++ b/packages/xflow-core/src/command-contributions/node/node-update.ts @@ -70,8 +70,8 @@ export class UpdateNodeCommand implements ICommand { nodeConfig?.width || NsUpdateNode.NODE_WIDTH, nodeConfig?.height || NsUpdateNode.NODE_HEIGHT, ) - if (isBoolean(nodeConfig?.visble)) { - x6Node.setVisible(nodeConfig?.visble) + if (isBoolean(nodeConfig?.visible)) { + x6Node.setVisible(nodeConfig?.visible) } // SVG 元素更新label