Skip to content

Commit 4e1e335

Browse files
[ifx]知识图谱箭头优化 删掉隐藏 review by qiw
1 parent 82edbe5 commit 4e1e335

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/common/overlay/knowledge-graph/G6Render.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,10 @@ export class G6Render {
7272
if (this.isCollpased(model.id)) {
7373
return `<ul>
7474
<li id='expand'>展开</li>
75-
<li id='hide'>隐藏</li>
7675
</ul>`;
7776
} else {
7877
return `<ul>
7978
<li id='collapse'>折叠</li>
80-
<li id='hide'>隐藏</li>
8179
</ul>`;
8280
}
8381
}
@@ -129,7 +127,8 @@ export class G6Render {
129127
type: 'line',
130128
style: {
131129
endArrow: {
132-
path: 'M 0,0 L 2,1 L 2,-1 Z'
130+
path: 'M 0,0 L 4,2 L 4,-2 Z',
131+
fill: '#333'
133132
},
134133
lineWidth: 0.5
135134
},
@@ -156,7 +155,7 @@ export class G6Render {
156155
shadowColor: hoverColor,
157156
shadowBlur: 5,
158157
endArrow: {
159-
path: 'M 0,0 L 2,1 L 2,-1 Z',
158+
path: 'M 0,0 L 4,2 L 4,-2 Z',
160159
fill: hoverColor
161160
}
162161
};

src/common/overlay/knowledge-graph/format.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ export function edgeFromGraphMap(entity, style) {
8787
};
8888
if (styleData.stroke) {
8989
edge.style.stroke = styleData.stroke;
90+
edge.style.endArrow = {
91+
path: 'M 0,0 L 4,2 L 4,-2 Z',
92+
fill: styleData.stroke
93+
},
9094
delete styleData.stroke;
9195
}
9296
if (styleData.lineWidth) {

0 commit comments

Comments
 (0)