Feat:主题新增节点高亮框的圆角配置

This commit is contained in:
街角小林
2024-09-23 17:19:47 +08:00
parent bc43fedd87
commit 1c9c399b76
2 changed files with 11 additions and 5 deletions

View File

@@ -349,7 +349,8 @@ class Style {
// hover和激活节点
hoverNode(node) {
const hoverRectColor = this.merge('hoverRectColor') || this.ctx.mindMap.opt.hoverRectColor
node.radius(5).fill('none').stroke({
const hoverRectRadius = this.merge('hoverRectRadius')
node.radius(hoverRectRadius).fill('none').stroke({
color: hoverRectColor
})
}

View File

@@ -87,7 +87,9 @@ export default {
// 连线标记的位置start头部、end尾部该配置在showLineMarker配置为true时生效
lineMarkerDir: 'end',
// 节点鼠标hover和激活时显示的矩形边框的颜色主题里不设置默认会取hoverRectColor实例化选项的值
hoverRectColor: ''
hoverRectColor: '',
// 点鼠标hover和激活时显示的矩形边框的圆角大小
hoverRectRadius: 5
},
// 二级节点样式
second: {
@@ -112,7 +114,8 @@ export default {
startDir: [0, 0],
endDir: [1, 0],
lineMarkerDir: 'end',
hoverRectColor: ''
hoverRectColor: '',
hoverRectRadius: 5
},
// 三级及以下节点样式
node: {
@@ -137,7 +140,8 @@ export default {
startDir: [0, 0],
endDir: [1, 0],
lineMarkerDir: 'end',
hoverRectColor: ''
hoverRectColor: '',
hoverRectRadius: 5
},
// 概要节点样式
generalization: {
@@ -161,7 +165,8 @@ export default {
endColor: '#fff',
startDir: [0, 0],
endDir: [1, 0],
hoverRectColor: ''
hoverRectColor: '',
hoverRectRadius: 5
}
}