diff --git a/ui/src/workflow/common/NodeContainer.vue b/ui/src/workflow/common/NodeContainer.vue
index 43c7e23ac..50619d2d1 100644
--- a/ui/src/workflow/common/NodeContainer.vue
+++ b/ui/src/workflow/common/NodeContainer.vue
@@ -26,19 +26,13 @@
{{ nodeModel.properties.stepName }}
-
+
-
+
@@ -130,7 +124,19 @@ const height = ref<{
})
const showAnchor = ref(false)
const anchorData = ref()
-const showNode = ref(true)
+// const showNode = ref(true)
+const showNode = computed({
+ set: (v) => {
+ set(props.nodeModel.properties, 'showNode', v)
+ },
+ get: () => {
+ if (props.nodeModel.properties.showNode !== undefined) {
+ return props.nodeModel.properties.showNode
+ }
+ set(props.nodeModel.properties, 'showNode', true)
+ return true
+ }
+})
const node_status = computed(() => {
if (props.nodeModel.properties.status) {
return props.nodeModel.properties.status
diff --git a/ui/src/workflow/common/app-node.ts b/ui/src/workflow/common/app-node.ts
index fefe04d6c..f720ad422 100644
--- a/ui/src/workflow/common/app-node.ts
+++ b/ui/src/workflow/common/app-node.ts
@@ -234,13 +234,14 @@ class AppNodeModel extends HtmlResize.model {
}
getDefaultAnchor() {
const { id, x, y, width } = this
+ const showNode = this.properties.showNode === undefined ? true : this.properties.showNode
const anchors: any = []
if (this.type !== WorkflowType.Base) {
if (this.type !== WorkflowType.Start) {
anchors.push({
x: x - width / 2 + 10,
- y: y,
+ y: showNode ? y : y - 15,
id: `${id}_left`,
edgeAddable: false,
type: 'left'
@@ -248,7 +249,7 @@ class AppNodeModel extends HtmlResize.model {
}
anchors.push({
x: x + width / 2 - 10,
- y: y,
+ y: showNode ? y : y - 15,
id: `${id}_right`,
type: 'right'
})
diff --git a/ui/src/workflow/nodes/condition-node/index.ts b/ui/src/workflow/nodes/condition-node/index.ts
index 0b46a8464..275c63a2d 100644
--- a/ui/src/workflow/nodes/condition-node/index.ts
+++ b/ui/src/workflow/nodes/condition-node/index.ts
@@ -35,10 +35,11 @@ class ConditionModel extends AppNodeModel {
if (this.height === undefined) {
this.height = 200
}
+ const showNode = this.properties.showNode === undefined ? true : this.properties.showNode
const anchors: any = []
anchors.push({
x: x - width / 2 + 10,
- y: y,
+ y: showNode ? y : y - 15,
id: `${id}_left`,
edgeAddable: false,
type: 'left'
@@ -50,7 +51,7 @@ class ConditionModel extends AppNodeModel {
const h = get_up_index_height(branch_condition_list, index)
anchors.push({
x: x + width / 2 - 10,
- y: y - height / 2 + 75 + h + element.height / 2,
+ y: showNode ? y - height / 2 + 75 + h + element.height / 2 : y - 15,
id: `${id}_${element.id}_right`,
type: 'right'
})