diff --git a/web/src/lang/en_us.js b/web/src/lang/en_us.js
index 5c3427f2..27278c94 100644
--- a/web/src/lang/en_us.js
+++ b/web/src/lang/en_us.js
@@ -38,7 +38,12 @@ export default {
isEnableNodeRichText: 'Enable node rich text editing',
mousewheelAction: 'Mouse wheel behavior',
zoomView: 'Zoom view',
- moveViewUpDown: 'Move view up and down'
+ moveViewUpDown: 'Move view up and down',
+ associativeLine: 'Associative line',
+ associativeLineWidth: 'Width',
+ associativeLineColor: 'Color',
+ associativeLineActiveWidth: 'Active width',
+ associativeLineActiveColor: 'Active color'
},
color: {
moreColor: 'More color'
@@ -187,7 +192,8 @@ export default {
saveAs: 'Save as',
import: 'Import',
export: 'Export',
- shortcutKey: 'Shortcut key'
+ shortcutKey: 'Shortcut key',
+ associativeLine: 'Associative line',
},
edit: {
newFeatureNoticeTitle: 'New feature reminder',
diff --git a/web/src/lang/zh_cn.js b/web/src/lang/zh_cn.js
index cbd64437..b017465e 100644
--- a/web/src/lang/zh_cn.js
+++ b/web/src/lang/zh_cn.js
@@ -38,7 +38,12 @@ export default {
isEnableNodeRichText: '是否开启节点富文本编辑',
mousewheelAction: '鼠标滚轮行为',
zoomView: '缩放视图',
- moveViewUpDown: '上下移动视图'
+ moveViewUpDown: '上下移动视图',
+ associativeLine: '关联线',
+ associativeLineWidth: '粗细',
+ associativeLineColor: '颜色',
+ associativeLineActiveWidth: '激活粗细',
+ associativeLineActiveColor: '激活颜色'
},
color: {
moreColor: '更多颜色'
@@ -187,7 +192,8 @@ export default {
saveAs: '另存为',
import: '导入',
export: '导出',
- shortcutKey: '快捷键'
+ shortcutKey: '快捷键',
+ associativeLine: '关联线',
},
edit: {
newFeatureNoticeTitle: '新特性提醒',
diff --git a/web/src/pages/Edit/components/BaseStyle.vue b/web/src/pages/Edit/components/BaseStyle.vue
index 4156585e..a901d4c0 100644
--- a/web/src/pages/Edit/components/BaseStyle.vue
+++ b/web/src/pages/Edit/components/BaseStyle.vue
@@ -209,6 +209,92 @@
+
+
{{ $t('baseStyle.associativeLine') }}
+
+
+ {{ $t('baseStyle.associativeLineColor') }}
+
+
+ {
+ update('associativeLineColor', color)
+ }
+ "
+ >
+
+
+
+ {{ $t('baseStyle.associativeLineWidth') }}
+ {
+ update('associativeLineWidth', value)
+ }
+ "
+ >
+
+
+
+
+
+
+
+ {{ $t('baseStyle.associativeLineActiveColor') }}
+
+
+ {
+ update('associativeLineActiveColor', color)
+ }
+ "
+ >
+
+
+
+ {{ $t('baseStyle.associativeLineActiveWidth') }}
+ {
+ update('associativeLineActiveWidth', value)
+ }
+ "
+ >
+
+
+
+
+
{{ $t('baseStyle.nodeBorderType') }}
@@ -498,6 +584,10 @@ export default {
lineStyle: '',
generalizationLineWidth: '',
generalizationLineColor: '',
+ associativeLineColor: '',
+ associativeLineWidth: 0,
+ associativeLineActiveWidth: 0,
+ associativeLineActiveColor: '',
paddingX: 0,
paddingY: 0,
imgMaxWidth: 0,
@@ -579,6 +669,10 @@ export default {
'lineColor',
'generalizationLineWidth',
'generalizationLineColor',
+ 'associativeLineColor',
+ 'associativeLineWidth',
+ 'associativeLineActiveWidth',
+ 'associativeLineActiveColor',
'paddingX',
'paddingY',
'imgMaxWidth',
diff --git a/web/src/pages/Edit/components/Edit.vue b/web/src/pages/Edit/components/Edit.vue
index 80141975..841a085e 100644
--- a/web/src/pages/Edit/components/Edit.vue
+++ b/web/src/pages/Edit/components/Edit.vue
@@ -30,6 +30,7 @@ import Export from 'simple-mind-map/src/Export.js'
import Drag from 'simple-mind-map/src/Drag.js'
import Select from 'simple-mind-map/src/Select.js'
import RichText from 'simple-mind-map/src/RichText.js'
+import AssociativeLine from 'simple-mind-map/src/AssociativeLine.js'
import Outline from './Outline'
import Style from './Style'
import BaseStyle from './BaseStyle'
@@ -56,6 +57,7 @@ MindMap
.usePlugin(KeyboardNavigation)
.usePlugin(Export)
.usePlugin(Select)
+ .usePlugin(AssociativeLine)
// 注册自定义主题
customThemeList.forEach((item) => {
@@ -121,6 +123,9 @@ export default {
this.$bus.$on('endTextEdit', () => {
this.mindMap.renderer.endTextEdit()
})
+ this.$bus.$on('createAssociativeLine', () => {
+ this.mindMap.associativeLine.createLineFromActiveNode()
+ })
if (this.openTest) {
setTimeout(() => {
this.test()
diff --git a/web/src/pages/Edit/components/Toolbar.vue b/web/src/pages/Edit/components/Toolbar.vue
index fc7759cf..e64e1c02 100644
--- a/web/src/pages/Edit/components/Toolbar.vue
+++ b/web/src/pages/Edit/components/Toolbar.vue
@@ -113,6 +113,16 @@
{{ $t('toolbar.summary') }}
+
+
+ {{ $t('toolbar.associativeLine') }}
+