File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " react-visual-modeling" ,
3
- "version" : " 1.0.44 " ,
3
+ "version" : " 1.0.45 " ,
4
4
"description" : " 一个基于React的数据可视化建模的DAG图,适用于UML,数据库建模,数据仓库建设等业务" ,
5
5
"main" : " dist/index.js" ,
6
6
"pack" : " pack/index.js" ,
Original file line number Diff line number Diff line change @@ -74,21 +74,29 @@ export default class BaseEdge extends Edge {
74
74
return container [ 0 ] ;
75
75
}
76
76
77
+ let dom = null ;
77
78
// 存在 labelRender 但是没有 label 的时候,需要 labelRender 拿到这个 dom 去渲染
78
79
if ( labelRender ) {
79
80
const span = document . createElement ( 'span' ) ;
80
81
span . className = 'visual-modeling-label' ;
81
82
span . style . position = 'absolute' ;
82
83
span . style . zIndex = 500 ;
83
- return span ;
84
+ dom = span ;
84
85
}
85
86
86
87
if ( label && typeof label === 'string' ) {
87
88
let container = $ ( '<span class="butterflies-label visual-modeling-label"></span>' ) ;
88
89
container . text ( label ) ;
89
-
90
- return container [ 0 ] ;
90
+ dom = container [ 0 ] ;
91
91
}
92
+
93
+ $ ( dom ) . on ( 'click' , ( ) => {
94
+ this . emit ( 'system.link.click' , {
95
+ edge : this
96
+ } ) ;
97
+ } ) ;
98
+
99
+ return dom ;
92
100
}
93
101
94
102
isConnect ( ) {
You can’t perform that action at this time.
0 commit comments