From 1286ef255a61ac348a8f5861ab93bc7aead512bb Mon Sep 17 00:00:00 2001 From: Xinhui Date: Wed, 9 Mar 2022 16:47:51 +0800 Subject: [PATCH] fix: typo in node and edge command visible update (#173) * fix: visible type * fix: add changelog * chore: update changelog --- .changeset/few-icons-draw.md | 8 ++++++++ .../src/command-contributions/edge/edge-update.ts | 2 +- .../src/command-contributions/node/node-update.ts | 4 ++-- 3 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 .changeset/few-icons-draw.md 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