diff --git a/simple-mind-map/package.json b/simple-mind-map/package.json index 43711733..8d67de78 100644 --- a/simple-mind-map/package.json +++ b/simple-mind-map/package.json @@ -1,6 +1,6 @@ { "name": "simple-mind-map", - "version": "0.9.2", + "version": "0.9.3", "description": "一个简单的web在线思维导图", "authors": [ { diff --git a/web/src/pages/Doc/en/changelog/index.md b/web/src/pages/Doc/en/changelog/index.md index 4b30ad9d..404ccbba 100644 --- a/web/src/pages/Doc/en/changelog/index.md +++ b/web/src/pages/Doc/en/changelog/index.md @@ -1,5 +1,37 @@ # Changelog +## 0.9.3 + +Fix + +> 1.Fix the issue of text misalignment when nodes have icons in Safari browser. +> +> 2.Fix the issue of formula rendering in browsers with lower versions of Chrome kernel. +> +> 3.Fix the issue of new MouseEvent code execution errors when used in micro front-end framework applications. +> +> 4.Fix the issue of missing arrows on node connections, arrows on associated lines, and gradient backgrounds when exporting images. + +New: + +> 1.Export PDF from jspdf library to pdf-lib library. +> +> 2.If the second parameter of the set node text command (SETNODE-TEXT) is not passed, the previous value will be used. +> +> 3.There is an issue of incorrect width and height of exported images in Firefox browser when optimizing nodes with hyperlinks and comments. +> +> 4.In node text editing, if the pasted data is in SMM format, the pure text of the first node will be taken out for pasting. +> +> 5.Add interception operations for pasting when editing nodes without rich text. +> +> 6.Add a detailed event (data_change_detail) for updating node data, which can retrieve newly created, updated, or deleted node data. +> +> 7.Theme configuration supports setting node gradient background color. + +Demo: + +1.Support setting the background of node gradients. + ## 0.9.2 Fix: diff --git a/web/src/pages/Doc/en/changelog/index.vue b/web/src/pages/Doc/en/changelog/index.vue index 283e0196..70ce0db8 100644 --- a/web/src/pages/Doc/en/changelog/index.vue +++ b/web/src/pages/Doc/en/changelog/index.vue @@ -1,6 +1,26 @@ diff --git a/web/src/pages/Doc/en/node/index.md b/web/src/pages/Doc/en/node/index.md index 008d982a..914ec392 100644 --- a/web/src/pages/Doc/en/node/index.md +++ b/web/src/pages/Doc/en/node/index.md @@ -219,9 +219,9 @@ if `key` is not passed, return the `data` object Set the value of the specified key in the data object of the node's real data nodeData, `SET_NODE_DATA` command's shortcut method. This method and command will not update the view, so if you want to modify the text, use the 'setText' method or use the command pointing to the text. -### setText(text, richText) +### setText(text, richText, resetRichText) -- `richText`: v0.4.2+,`Boolean`, If you want to set rich text content, that is, `html` character, `richText` needs to be passed `true` +- `richText`: v0.4.2+,`Boolean`, If you want to set rich text content, that is, `html` character, `richText` needs to be passed `true`. After version 0.9.3+, if this parameter is not passed, it will use previous value. - `resetRichText`: v0.6.10+, `Boolean`, whether to reset rich text, The default is 'false'. If 'true' is passed, the style of the rich text node will be reset diff --git a/web/src/pages/Doc/en/node/index.vue b/web/src/pages/Doc/en/node/index.vue index b2009736..7758f4da 100644 --- a/web/src/pages/Doc/en/node/index.vue +++ b/web/src/pages/Doc/en/node/index.vue @@ -162,10 +162,10 @@ if key is not passed, return the data object

setData(data)

Set the value of the specified key in the data object of the node's real data nodeData, SET_NODE_DATA command's shortcut method. This method and command will not update the view, so if you want to modify the text, use the 'setText' method or use the command pointing to the text.

-

setText(text, richText)

+

setText(text, richText, resetRichText)

Check if the two node instance lists contain the same nodes.

+

getChromeVersion()

+
+

v0.9.3+

+
+

Get the current version of the Chrome kernel used by the browser. If the current browser is not using the 'Chrome' kernel, an empty string will be returned.

+

transformTreeDataToObject(data)

+
+

v0.9.3+

+
+ +

Convert the mind map tree structure to a level object.

+
{
+        data: {
+            uid: 'xxx'
+        },
+        children: [
+            {
+                data: {
+                    uid: 'xxx'
+                },
+                children: []
+            }
+        ]
+    }
+
+

Convert to:

+
    {
+        uid: {
+            children: [uid1, uid2],
+            data: {}
+        }
+    }
+
+

transformObjectToTreeData(data)

+
+

v0.9.3+

+
+

Convert flat objects into a tree structure. Reverse operation of the transformTreeDataToObject method.

Simulate CSS background in Canvas

Import:

import drawBackgroundImageToCanvas from 'simple-mind-map/src/utils/simulateCSSBackgroundInCanvas'
diff --git a/web/src/pages/Doc/zh/changelog/index.md b/web/src/pages/Doc/zh/changelog/index.md
index 60e636fb..65f7c395 100644
--- a/web/src/pages/Doc/zh/changelog/index.md
+++ b/web/src/pages/Doc/zh/changelog/index.md
@@ -1,5 +1,37 @@
 # Changelog
 
+## 0.9.3
+
+修复:
+
+> 1.修复 Safari 浏览器上节点存在图标时文字位置错位的问题。
+>
+> 2.修复 Chrome 内核版本比较低的浏览器中公式无法渲染的问题。
+>
+> 3.修复在微前端框架子应用中使用时,new MouseEvent代码执行报错的问题。
+>
+> 4.修复导出图片时节点连线的箭头、关联线的箭头、渐变背景丢失的问题。
+
+新增:
+
+> 1.导出 pdf 从 jspdf 库改为 pdf-lib 库。
+>
+> 2.设置节点文本命令(SET_NODE_TEXT)的第二个参数如果没有传递,会使用之前的值。
+>
+> 3.优化节点存在超链接、备注时在 Firefox 浏览器中导出图片的宽高不正确的问题。
+>
+> 4.节点文本编辑中,如果粘贴的是 smm 格式的粘贴数据,那么会取出第一个节点的纯文本进行粘贴。
+>
+> 5.增加对节点非富文本编辑时的粘贴的拦截操作。
+>
+> 6.新增节点数据更新的明细事件(data_change_detail),可以获取新创建、更新、被删除的节点数据。
+>
+> 7.主题配置支持设置节点渐变背景色。
+
+Demo:
+
+1.支持设置节点渐变色的背景。
+
 ## 0.9.2
 
 修复:
diff --git a/web/src/pages/Doc/zh/changelog/index.vue b/web/src/pages/Doc/zh/changelog/index.vue
index 95b279c9..bb0906f5 100644
--- a/web/src/pages/Doc/zh/changelog/index.vue
+++ b/web/src/pages/Doc/zh/changelog/index.vue
@@ -1,6 +1,26 @@
 
diff --git a/web/src/pages/Doc/zh/node/index.md b/web/src/pages/Doc/zh/node/index.md
index 70d0d579..657f087f 100644
--- a/web/src/pages/Doc/zh/node/index.md
+++ b/web/src/pages/Doc/zh/node/index.md
@@ -218,7 +218,7 @@
 
 ### setText(text, richText, resetRichText)
 
-- `richText`:v0.4.2+,`Boolean`,如果要设置的是富文本内容,也就是`html`字符,`richText`需要传`true`
+- `richText`:v0.4.2+,`Boolean`,如果要设置的是富文本内容,也就是`html`字符,`richText`需要传`true`。在v0.9.3+版本后该参数不传会默认使用之前的值。
 
 - `resetRichText`:v0.6.10+,`Boolean`,是否要复位富文本,默认为`false`,如果传`true`那么会重置富文本节点的样式
 
diff --git a/web/src/pages/Doc/zh/node/index.vue b/web/src/pages/Doc/zh/node/index.vue
index 84fd2cdb..c0e15c42 100644
--- a/web/src/pages/Doc/zh/node/index.vue
+++ b/web/src/pages/Doc/zh/node/index.vue
@@ -158,7 +158,7 @@
 

setText(text, richText, resetRichText)

检查两个节点实例列表包含的节点是否是一样的。

+

getChromeVersion()

+
+

v0.9.3+

+
+

获取当前浏览器使用的Chrome内核版本。如果当前浏览器使用的不是 Chrome内核,那么会返回空字符串。

+

transformTreeDataToObject(data)

+
+

v0.9.3+

+
+ +

将思维导图树结构转平级对象。

+
{
+        data: {
+            uid: 'xxx'
+        },
+        children: [
+            {
+                data: {
+                    uid: 'xxx'
+                },
+                children: []
+            }
+        ]
+    }
+
+

转为:

+
    {
+        uid: {
+            children: [uid1, uid2],
+            data: {}
+        }
+    }
+
+

transformObjectToTreeData(data)

+
+

v0.9.3+

+
+

将平级对象转树结构。transformTreeDataToObject方法的反向操作。

在canvas中模拟css的背景属性

引入:

import drawBackgroundImageToCanvas from 'simple-mind-map/src/utils/simulateCSSBackgroundInCanvas'