File tree Expand file tree Collapse file tree 3 files changed +21
-13
lines changed Expand file tree Collapse file tree 3 files changed +21
-13
lines changed Original file line number Diff line number Diff line change 26
26
<h4 v-else >{{ nodeModel.properties.stepName }}</h4 >
27
27
</div >
28
28
29
- <div
30
- @mousemove.stop
31
- @mousedown.stop
32
- @keydown.stop
33
- @click.stop
34
- v-if =" showOperate(nodeModel.type)"
35
- >
29
+ <div @mousemove.stop @mousedown.stop @keydown.stop @click.stop >
36
30
<el-button text @click =" showNode = !showNode" class =" mr-4" >
37
31
<el-icon class =" arrow-icon" :class =" showNode ? 'rotate-180' : ''"
38
32
><ArrowDownBold />
39
33
</el-icon >
40
34
</el-button >
41
- <el-dropdown :teleported =" false" trigger =" click" >
35
+ <el-dropdown v-if = " showOperate(nodeModel.type) " :teleported =" false" trigger =" click" >
42
36
<el-button text >
43
37
<el-icon class =" color-secondary" ><MoreFilled /></el-icon >
44
38
</el-button >
@@ -130,7 +124,19 @@ const height = ref<{
130
124
})
131
125
const showAnchor = ref <boolean >(false )
132
126
const anchorData = ref <any >()
133
- const showNode = ref <boolean >(true )
127
+ // const showNode = ref<boolean>(true)
128
+ const showNode = computed ({
129
+ set : (v ) => {
130
+ set (props .nodeModel .properties , ' showNode' , v )
131
+ },
132
+ get : () => {
133
+ if (props .nodeModel .properties .showNode !== undefined ) {
134
+ return props .nodeModel .properties .showNode
135
+ }
136
+ set (props .nodeModel .properties , ' showNode' , true )
137
+ return true
138
+ }
139
+ })
134
140
const node_status = computed (() => {
135
141
if (props .nodeModel .properties .status ) {
136
142
return props .nodeModel .properties .status
Original file line number Diff line number Diff line change @@ -234,21 +234,22 @@ class AppNodeModel extends HtmlResize.model {
234
234
}
235
235
getDefaultAnchor ( ) {
236
236
const { id, x, y, width } = this
237
+ const showNode = this . properties . showNode === undefined ? true : this . properties . showNode
237
238
const anchors : any = [ ]
238
239
239
240
if ( this . type !== WorkflowType . Base ) {
240
241
if ( this . type !== WorkflowType . Start ) {
241
242
anchors . push ( {
242
243
x : x - width / 2 + 10 ,
243
- y : y ,
244
+ y : showNode ? y : y - 15 ,
244
245
id : `${ id } _left` ,
245
246
edgeAddable : false ,
246
247
type : 'left'
247
248
} )
248
249
}
249
250
anchors . push ( {
250
251
x : x + width / 2 - 10 ,
251
- y : y ,
252
+ y : showNode ? y : y - 15 ,
252
253
id : `${ id } _right` ,
253
254
type : 'right'
254
255
} )
Original file line number Diff line number Diff line change @@ -35,10 +35,11 @@ class ConditionModel extends AppNodeModel {
35
35
if ( this . height === undefined ) {
36
36
this . height = 200
37
37
}
38
+ const showNode = this . properties . showNode === undefined ? true : this . properties . showNode
38
39
const anchors : any = [ ]
39
40
anchors . push ( {
40
41
x : x - width / 2 + 10 ,
41
- y : y ,
42
+ y : showNode ? y : y - 15 ,
42
43
id : `${ id } _left` ,
43
44
edgeAddable : false ,
44
45
type : 'left'
@@ -50,7 +51,7 @@ class ConditionModel extends AppNodeModel {
50
51
const h = get_up_index_height ( branch_condition_list , index )
51
52
anchors . push ( {
52
53
x : x + width / 2 - 10 ,
53
- y : y - height / 2 + 75 + h + element . height / 2 ,
54
+ y : showNode ? y - height / 2 + 75 + h + element . height / 2 : y - 15 ,
54
55
id : `${ id } _${ element . id } _right` ,
55
56
type : 'right'
56
57
} )
You can’t perform that action at this time.
0 commit comments