diff --git a/simple-mind-map/package.json b/simple-mind-map/package.json index 01ec877b..38f50c38 100644 --- a/simple-mind-map/package.json +++ b/simple-mind-map/package.json @@ -1,6 +1,6 @@ { "name": "simple-mind-map", - "version": "0.9.7", + "version": "0.9.8", "description": "一个简单的web在线思维导图", "authors": [ { diff --git a/web/src/pages/Doc/en/changelog/index.md b/web/src/pages/Doc/en/changelog/index.md index 1cd983a4..527e2b3a 100644 --- a/web/src/pages/Doc/en/changelog/index.md +++ b/web/src/pages/Doc/en/changelog/index.md @@ -1,5 +1,45 @@ # Changelog +## 0.9.8 + +Fix: + +> 1.Fix the issue of incorrect calculation function of mind maps within the canvas and scroll bar positions when the canvas size changes; +> +> 2.Fix the issue of errors when importing some old version xmind files; +> +> 3.Fix the issue where the highlight box of the collapsed node does not disappear when searching for highlighted nodes in read-only mode; +> +> 4.Fix the issue where data changes during search and search results are not updated in certain situations; +> +> 5.Fix the issue of deleting adjacent nodes when deleting nodes that are currently being edited; +> +> 6.Fix the issue of rendering only the root node when expand: false is set to the root node in the node data; +> +> 7.Fix the collaborative editing plugin: When a node is selected and then folded, the activation status of the node disappears, but the selected status of the node still exists in other clients; + +New: + +> 1.The commands such as INSERTNODE will not overwrite custom UIDs; +> +> 2.Methods for adding and removing highlighting for node instances; Adjust the way read-only mode searches for highlighted nodes; +> +> 3.Add configuration for searching all nodes (including those that have been folded); Search defaults to searching all nodes; +> +> 4.Add configuration options that cannot be selected by multiple people on the same node during collaborative editing; +> +> 5.Add lifecycle function configuration options before synchronizing collaborative editing node operations; +> +> 6.Add UID field to the summary node; + +Demo: + +> 1.Fix the issue where shortcut keys become invalid after opening label pop ups and note pop ups and clicking on the mask to close them; +> +> 2.Modify the association logic between themes and dark colors; +> +> 3.Support reading local directories; + ## 0.9.7 Fix: diff --git a/web/src/pages/Doc/en/changelog/index.vue b/web/src/pages/Doc/en/changelog/index.vue index 0d295ac1..f36f8792 100644 --- a/web/src/pages/Doc/en/changelog/index.vue +++ b/web/src/pages/Doc/en/changelog/index.vue @@ -1,6 +1,32 @@ diff --git a/web/src/pages/Doc/zh/changelog/index.md b/web/src/pages/Doc/zh/changelog/index.md index 46ded7ae..54f396f6 100644 --- a/web/src/pages/Doc/zh/changelog/index.md +++ b/web/src/pages/Doc/zh/changelog/index.md @@ -1,5 +1,45 @@ # Changelog +## 0.9.8 + +修复: + +> 1.修复当画布大小改变后,限制思维导图在画布内和滚动条位置计算功能不正确的问题; +> +> 2.修复导入某些旧版xmind文件时报错的问题; +> +> 3.修复只读模式搜索高亮节点时收起节点高亮框未消失的问题; +> +> 4.修复某些情况下搜索时数据改变,搜索结果没有更新的问题; +> +> 5.修复删除正在编辑中的节点时实际上删除的是相邻节点的问题; +> +> 6.修复节点数据中根节点设置了expand:false时只渲染根节点的问题; +> +> 7.修复协同编辑插件:当选中一个节点时,再将该节点收起,该节点激活状态已消失,但其他客户端该节点的选中状态依旧存在的问题; + +新增: + +> 1.INSERT_NODE等命令不会覆盖自定义的uid; +> +> 2.节点实例新增高亮和取消高亮的方法;调整只读模式搜索高亮节点的方式; +> +> 3.新增搜索所有节点(包含被收起的节点)的配置;搜索默认改为搜索所有节点; +> +> 4.增加协同编辑时同一节点不能多人选中的配置选项; +> +> 5.增加协同编辑节点操作同步前的生命周期函数配置选项; +> +> 6.概要节点增加uid字段; + +Demo: + +> 1.修复打开标签弹窗、备注弹窗后点击遮罩关闭弹窗后快捷键会失效的问题; +> +> 2.修改主题和暗色的关联逻辑; +> +> 3.支持读取本地目录; + ## 0.9.7 修复: diff --git a/web/src/pages/Doc/zh/changelog/index.vue b/web/src/pages/Doc/zh/changelog/index.vue index 09bc9b84..f53cb0f3 100644 --- a/web/src/pages/Doc/zh/changelog/index.vue +++ b/web/src/pages/Doc/zh/changelog/index.vue @@ -1,6 +1,32 @@ diff --git a/web/src/pages/Edit/components/Edit.vue b/web/src/pages/Edit/components/Edit.vue index 6b23fc77..91388173 100644 --- a/web/src/pages/Edit/components/Edit.vue +++ b/web/src/pages/Edit/components/Edit.vue @@ -96,7 +96,7 @@ MindMap.usePlugin(MiniMap) .usePlugin(SearchPlugin) .usePlugin(Painter) .usePlugin(Formula) -// .usePlugin(Cooperate)// 协同插件 + .usePlugin(Cooperate) // 协同插件 // 注册自定义主题 customThemeList.forEach(item => { @@ -346,6 +346,23 @@ export default { default: break } + }, + beforeCooperateUpdate: ({ type, data }) => { + if (type === 'createOrUpdate') { + if (data.data.version === undefined) { + data.data.version = 0 + } + const newVersion = data.data.version + 1 + data.data.version = newVersion + const targetNode = this.mindMap.renderer.findNodeByUid( + data.data.uid + ) + if (targetNode) { + targetNode.setData({ + version: newVersion + }) + } + } } // handleNodePasteImg: img => { // console.log(img) @@ -439,6 +456,24 @@ export default { this.$bus.$emit(event, ...args) }) }) + this.mindMap.on('data_change_detail', actions => { + actions.forEach(({ action, oldData, data }) => { + console.log(action, oldData, data) + if (action === 'create') { + console.log('调新增接口', data) + } else if (action === 'update') { + const oldChildrenLength = oldData.children.length + const newChildrenLength = data.children.length + if (oldChildrenLength !== newChildrenLength) { + console.log('调移动接口', oldChildrenLength, newChildrenLength) + } else { + console.log('更新调接口') + } + } else if (action === 'delete') { + console.log('调删除节点', data) + } + }) + }) this.bindSaveEvent() this.testDynamicCreateNodes() // 如果应用被接管,那么抛出事件传递思维导图实例 @@ -701,7 +736,7 @@ export default { if (this.mindMap.cooperate && this.$route.query.userName) { this.mindMap.cooperate.setProvider(null, { roomName: 'demo-room', - signalingList: ['ws://192.168.3.125:4444'] + signalingList: ['ws://10.16.83.11:4444'] }) this.mindMap.cooperate.setUserInfo({ id: Math.random(),