Feat:主题配置支持设置关联线的样式,即实线或虚线
This commit is contained in:
parent
182cdf5153
commit
3801dc3ec4
@ -213,7 +213,8 @@ class AssociativeLine {
|
|||||||
associativeLineWidth,
|
associativeLineWidth,
|
||||||
associativeLineColor,
|
associativeLineColor,
|
||||||
associativeLineActiveWidth,
|
associativeLineActiveWidth,
|
||||||
associativeLineActiveColor
|
associativeLineActiveColor,
|
||||||
|
associativeLineDasharray
|
||||||
} = this.mindMap.themeConfig
|
} = this.mindMap.themeConfig
|
||||||
// 箭头
|
// 箭头
|
||||||
this.markerPath
|
this.markerPath
|
||||||
@ -232,7 +233,7 @@ class AssociativeLine {
|
|||||||
.stroke({
|
.stroke({
|
||||||
width: associativeLineWidth,
|
width: associativeLineWidth,
|
||||||
color: associativeLineColor,
|
color: associativeLineColor,
|
||||||
dasharray: [6, 4]
|
dasharray: associativeLineDasharray || [6, 4]
|
||||||
})
|
})
|
||||||
.fill({ color: 'none' })
|
.fill({ color: 'none' })
|
||||||
path.plot(pathStr)
|
path.plot(pathStr)
|
||||||
@ -331,8 +332,11 @@ class AssociativeLine {
|
|||||||
|
|
||||||
// 创建连接线
|
// 创建连接线
|
||||||
createLine(fromNode) {
|
createLine(fromNode) {
|
||||||
let { associativeLineWidth, associativeLineColor } =
|
let {
|
||||||
this.mindMap.themeConfig
|
associativeLineWidth,
|
||||||
|
associativeLineColor,
|
||||||
|
associativeLineDasharray
|
||||||
|
} = this.mindMap.themeConfig
|
||||||
if (this.isCreatingLine || !fromNode) return
|
if (this.isCreatingLine || !fromNode) return
|
||||||
this.front()
|
this.front()
|
||||||
this.isCreatingLine = true
|
this.isCreatingLine = true
|
||||||
@ -342,7 +346,7 @@ class AssociativeLine {
|
|||||||
.stroke({
|
.stroke({
|
||||||
width: associativeLineWidth,
|
width: associativeLineWidth,
|
||||||
color: associativeLineColor,
|
color: associativeLineColor,
|
||||||
dasharray: [6, 4]
|
dasharray: associativeLineDasharray || [6, 4]
|
||||||
})
|
})
|
||||||
.fill({ color: 'none' })
|
.fill({ color: 'none' })
|
||||||
// 箭头
|
// 箭头
|
||||||
|
|||||||
@ -42,6 +42,8 @@ export default {
|
|||||||
associativeLineActiveWidth: 8,
|
associativeLineActiveWidth: 8,
|
||||||
// 关联线激活状态的颜色
|
// 关联线激活状态的颜色
|
||||||
associativeLineActiveColor: 'rgba(2, 167, 240, 1)',
|
associativeLineActiveColor: 'rgba(2, 167, 240, 1)',
|
||||||
|
// 关联线样式
|
||||||
|
associativeLineDasharray: [6, 4],
|
||||||
// 关联线文字颜色
|
// 关联线文字颜色
|
||||||
associativeLineTextColor: 'rgb(51, 51, 51)',
|
associativeLineTextColor: 'rgb(51, 51, 51)',
|
||||||
// 关联线文字大小
|
// 关联线文字大小
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user