diff --git a/README.md b/README.md index 9ab63dbe..873f64c9 100644 --- a/README.md +++ b/README.md @@ -306,4 +306,8 @@ const mindMap = new MindMap({ SR + + + 逆水行舟 +

diff --git a/simple-mind-map/package.json b/simple-mind-map/package.json index 00fc8d09..5794e6ac 100644 --- a/simple-mind-map/package.json +++ b/simple-mind-map/package.json @@ -1,6 +1,6 @@ { "name": "simple-mind-map", - "version": "0.9.8", + "version": "0.9.9", "description": "一个简单的web在线思维导图", "authors": [ { diff --git a/simple-mind-map/src/core/render/node/nodeCreateContents.js b/simple-mind-map/src/core/render/node/nodeCreateContents.js index 56855947..8fe5f3c7 100644 --- a/simple-mind-map/src/core/render/node/nodeCreateContents.js +++ b/simple-mind-map/src/core/render/node/nodeCreateContents.js @@ -92,13 +92,13 @@ function createIconNode() { } node.size(iconSize, iconSize) node.on('click', e => { - this.mindMap.emit('node_icon_click', this, item, e) + this.mindMap.emit('node_icon_click', this, item, e, node) }) node.on('mouseenter', e => { - this.mindMap.emit('node_icon_mouseenter', this, item, e) + this.mindMap.emit('node_icon_mouseenter', this, item, e, node) }) node.on('mouseleave', e => { - this.mindMap.emit('node_icon_mouseleave', this, item, e) + this.mindMap.emit('node_icon_mouseleave', this, item, e, node) }) return { node, diff --git a/web/src/assets/avatar/逆水行舟.jpg b/web/src/assets/avatar/逆水行舟.jpg new file mode 100644 index 00000000..e8ad08da Binary files /dev/null and b/web/src/assets/avatar/逆水行舟.jpg differ diff --git a/web/src/pages/Doc/catalogList.js b/web/src/pages/Doc/catalogList.js index e3b24d5d..0c244d17 100644 --- a/web/src/pages/Doc/catalogList.js +++ b/web/src/pages/Doc/catalogList.js @@ -11,7 +11,7 @@ let langList = [ } ] let StartList = ['introduction', 'start', 'deploy', 'client', 'translate', 'changelog'] -let CourseList = new Array(25).fill(0).map((_, index) => { +let CourseList = new Array(26).fill(0).map((_, index) => { return 'course' + (index + 1) }) let APIList = [ @@ -38,6 +38,7 @@ let APIList = [ 'scrollbar', 'formula', 'cooperate', + 'rainbowLines', 'handDrawnLikeStyle', 'xmind', 'markdown', diff --git a/web/src/pages/Doc/en/changelog/index.md b/web/src/pages/Doc/en/changelog/index.md index f7ab214f..c359db7f 100644 --- a/web/src/pages/Doc/en/changelog/index.md +++ b/web/src/pages/Doc/en/changelog/index.md @@ -1,5 +1,35 @@ # Changelog +## 0.9.9 + +New: + +> 1.Support inserting child nodes with the insert key; +> +> 2.Add the beforeShortcutRun instantiation option to intercept shortcut key operations; +> +> 3.The method of incrementally updating canvas data by adding root instances, updateData; +> +> 4.Add a rainbow line plugin; +> +> 5.Add mouse in and out events to icons in nodes; +> +> 6.Add the getAncestorNodes method to the node instance to obtain the list of ancestor nodes; +> +> 7.Adding mouse events to personnel avatars during collaborative editing; + +Demo: + +> 1.Support configuration of rainbow lines; + +Client: + +> 1.Double click the file to open the application without opening the workbench page; +> +> 2.Fix the issue of multiple editing windows opening when repeatedly opening the same file; +> +> 3.Prompt for modifying and deleting files being edited; + ## 0.9.8 Fix: diff --git a/web/src/pages/Doc/en/changelog/index.vue b/web/src/pages/Doc/en/changelog/index.vue index d1372116..954c91a3 100644 --- a/web/src/pages/Doc/en/changelog/index.vue +++ b/web/src/pages/Doc/en/changelog/index.vue @@ -1,6 +1,27 @@ diff --git a/web/src/pages/Doc/en/node/index.md b/web/src/pages/Doc/en/node/index.md index c2a9f911..e388a0d3 100644 --- a/web/src/pages/Doc/en/node/index.md +++ b/web/src/pages/Doc/en/node/index.md @@ -56,6 +56,12 @@ Whether the node is currently being dragged ## Methods +### getAncestorNodes() + +> v0.9.9+ + +Obtain a list of ancestor node instances. + ### highlight() > v0.9.8+ diff --git a/web/src/pages/Doc/en/node/index.vue b/web/src/pages/Doc/en/node/index.vue index ad61c2ec..3c534942 100644 --- a/web/src/pages/Doc/en/node/index.vue +++ b/web/src/pages/Doc/en/node/index.vue @@ -31,6 +31,11 @@

Whether the node is currently being dragged

Methods

+

getAncestorNodes()

+
+

v0.9.9+

+
+

Obtain a list of ancestor node instances.

highlight()

v0.9.8+

diff --git a/web/src/pages/Doc/en/rainbowLines/index.md b/web/src/pages/Doc/en/rainbowLines/index.md new file mode 100644 index 00000000..c9c5d0cb --- /dev/null +++ b/web/src/pages/Doc/en/rainbowLines/index.md @@ -0,0 +1,56 @@ +# RainbowLines plugin + +> v0.9.9+ + +This plugin is used to implement rainbow lines. + +Enabling rainbow lines and custom colors can be set through the instantiation option 'rainbowLinesConfig'. + +The default color list is as follows: + +``` +[ + 'rgb(255, 213, 73)', + 'rgb(255, 136, 126)', + 'rgb(107, 225, 141)', + 'rgb(151, 171, 255)', + 'rgb(129, 220, 242)', + 'rgb(255, 163, 125)', + 'rgb(152, 132, 234)' +] +``` + +## Register + +```js +import MindMap from 'simple-mind-map' +import RainbowLines from 'simple-mind-map/src/plugins/RainbowLines.js' +MindMap.usePlugin(RainbowLines) +``` + +After registration and instantiation of `MindMap`, the instance can be obtained through `mindMap.rainbowLines`. + +## Method + +### updateRainLinesConfig(config = {}) + +If you want to modify the rainbow lines after setting them through the instantiation option 'rainbowLinesConfig', you can use this method, option `config` is same with `rainbowLinesConfig`。 + +```js +{ + open: false,// Is turn on rainbow lines + colorsList: []// Customize the color list for rainbow lines. If not set, the default color list will be used +} +``` + +### getColorsList() + +Get a list of currently used rainbow line colors. + +### getNodeColor(node) + +Retrieve the rainbow line color corresponding to the specified node instance. + +### getSecondLayerAncestor(node) + +Retrieve the second level ancestor node instance of a node instance. \ No newline at end of file diff --git a/web/src/pages/Doc/en/rainbowLines/index.vue b/web/src/pages/Doc/en/rainbowLines/index.vue new file mode 100644 index 00000000..1bfe0b3a --- /dev/null +++ b/web/src/pages/Doc/en/rainbowLines/index.vue @@ -0,0 +1,52 @@ + + + + + \ No newline at end of file diff --git a/web/src/pages/Doc/routerList.js b/web/src/pages/Doc/routerList.js index c726acfe..74bf8993 100644 --- a/web/src/pages/Doc/routerList.js +++ b/web/src/pages/Doc/routerList.js @@ -32,6 +32,7 @@ export default [ { path: 'course23', title: '如何渲染滚动条' }, { path: 'course24', title: '如何开发一个插件' }, { path: 'course25', title: '关于概要' }, + { path: 'course26', title: '如何实现AI生成节点内容' }, { path: 'doExport', title: 'Export 插件' }, { path: 'drag', title: 'Drag插件' }, { path: 'introduction', title: '简介' }, @@ -60,6 +61,7 @@ export default [ { path: 'scrollbar', title: 'Scrollbar插件' }, { path: 'formula', title: 'Formula插件' }, { path: 'cooperate', title: 'Cooperate插件' }, + { path: 'rainbowLines', title: 'RainbowLines插件' }, { path: 'handDrawnLikeStyle', title: 'HandDrawnLikeStyle收费插件' }, { path: 'help1', title: '概要/关联线' }, { path: 'help2', title: '客户端' }, @@ -102,6 +104,7 @@ export default [ { path: 'scrollbar', title: 'Scrollbar plugin' }, { path: 'formula', title: 'Formula plugin' }, { path: 'cooperate', title: 'Cooperate plugin' }, + { path: 'rainbowLines', title: 'RainbowLines plugin' }, { path: 'handDrawnLikeStyle', title: 'HandDrawnLikeStyle chargeable plugin' }, { path: 'client', title: 'Client' } ] diff --git a/web/src/pages/Doc/zh/changelog/index.md b/web/src/pages/Doc/zh/changelog/index.md index 4d6cb5c5..5438ce89 100644 --- a/web/src/pages/Doc/zh/changelog/index.md +++ b/web/src/pages/Doc/zh/changelog/index.md @@ -1,5 +1,35 @@ # Changelog +## 0.9.9 + +新增: + +> 1.支持insert键插入下级节点; +> +> 2.增加beforeShortcutRun实例化选项用于拦截快捷键操作; +> +> 3.根实例增加增量更新画布数据的方法updateData; +> +> 4.新增彩虹线条插件; +> +> 5.节点中的图标添加鼠标移入和移出事件; +> +> 6.节点实例新增getAncestorNodes方法用于获取祖先节点列表; +> +> 7.协同编辑时的人员头像增加鼠标事件; + +Demo: + +> 1.支持配置彩虹线条; + +客户端: + +> 1.双击文件打开应用时不打开工作台页面; +> +> 2.修复重复打开同一个文件会打开多个编辑窗口的问题; +> +> 3.修改删除正在编辑的文件的提示; + ## 0.9.8 修复: diff --git a/web/src/pages/Doc/zh/changelog/index.vue b/web/src/pages/Doc/zh/changelog/index.vue index 34b1bf0c..38240597 100644 --- a/web/src/pages/Doc/zh/changelog/index.vue +++ b/web/src/pages/Doc/zh/changelog/index.vue @@ -1,6 +1,27 @@