Doc:update

This commit is contained in:
wanglin2 2023-07-18 09:21:58 +08:00
parent daf9888da4
commit 2bf146816b
14 changed files with 128 additions and 2 deletions

View File

@ -1,5 +1,15 @@
# Changelog
## 0.6.7
Fix: 1.Fixed the issue of missing placeholder elements for the expand and collapse button after node collapse and expansion. 2.Fixed the issue of being able to scale images in read-only mode.
New: 1.Support locating to a node based on node instance or node uid. 2.Modify the creation method of node uids and export data to add node uids.
Remove: 1.Remove the node transition effect.
Demo: 1.Add website homepage. 2.Fixed the issue of missing node styles when creating new nodes in the outline. 3.Fixed the issue of missing edited text after pressing Enter or Tab after editing nodes in the outline. 4.Optimize the node positioning of the outline, and the collapsed nodes will automatically expand. 5.The sidebar button supports folding. 6.Optimize small screen adaptation.
## 0.6.6
New: 1.Support exporting to Xmind new version files. 2.Importing the new version of Xmind file supports importing images from nodes. 3.Add a vertical timeline structure.

View File

@ -1,6 +1,11 @@
<template>
<div>
<h1>Changelog</h1>
<h2>0.6.7</h2>
<p>Fix: 1.Fixed the issue of missing placeholder elements for the expand and collapse button after node collapse and expansion. 2.Fixed the issue of being able to scale images in read-only mode.</p>
<p>New: 1.Support locating to a node based on node instance or node uid. 2.Modify the creation method of node uids and export data to add node uids.</p>
<p>Remove: 1.Remove the node transition effect.</p>
<p>Demo: 1.Add website homepage. 2.Fixed the issue of missing node styles when creating new nodes in the outline. 3.Fixed the issue of missing edited text after pressing Enter or Tab after editing nodes in the outline. 4.Optimize the node positioning of the outline, and the collapsed nodes will automatically expand. 5.The sidebar button supports folding. 6.Optimize small screen adaptation.</p>
<h2>0.6.6</h2>
<p>New: 1.Support exporting to Xmind new version files. 2.Importing the new version of Xmind file supports importing images from nodes. 3.Add a vertical timeline structure.</p>
<p>Fix: 1.The TouchEvent plugin no longer sends click events, solving the problem of two windows opening when clicking on a hyperlink on the mobile end. 2.Fix the issue of dragging and moving a node to become a child node of another node, where the parent node of that node points to not being updated. 3.Fixed an issue where the node border style was not updated when dragging a second level node into a third level node. 4.Fix the issue where the mouse will not trigger the button display when moving into the unfolded or retracted button position, except for the structure growing to the right.</p>

View File

@ -347,6 +347,7 @@ redo. All commands are as follows:
| SET_NODE_CUSTOM_POSITION (v0.2.0+) | Set a custom position for a node | node (the node to set), left (custom x coordinate, default is undefined), top (custom y coordinate, default is undefined) |
| RESET_LAYOUT (v0.2.0+) | Arrange layout with one click | |
| SET_NODE_SHAPE (v0.2.4+) | Set the shape of a node | node (the node to set), shape (the shape, all shapes: [Shape.js](https://github.com/wanglin2/mind-map/blob/main/simple-mind-map/src/core/render/node/Shape.js)) |
| GO_TARGET_NODEv0.6.7+ | Navigate to a node, and if the node is collapsed, it will automatically expand to that node | nodeNode instance or node uid to locate |
### setData(data)

View File

@ -920,6 +920,11 @@ redo. All commands are as follows:</p>
<td>Set the shape of a node</td>
<td>node (the node to set), shape (the shape, all shapes: <a href="https://github.com/wanglin2/mind-map/blob/main/simple-mind-map/src/core/render/node/Shape.js">Shape.js</a>)</td>
</tr>
<tr>
<td>GO_TARGET_NODEv0.6.7+</td>
<td>Navigate to a node, and if the node is collapsed, it will automatically expand to that node</td>
<td>nodeNode instance or node uid to locate</td>
</tr>
</tbody>
</table>
<h3>setData(data)</h3>

View File

@ -91,4 +91,22 @@ Move a node behind another node
Move a node to the center of the canvas.
Currently, if there is zoom, returning to the center will reset the zoom.
Currently, if there is zoom, returning to the center will reset the zoom.
### expandToNodeUid(uid, callback)
> v0.6.7+
- `uid`: uid of node
- `callback`: Expand completed callback function
Expand to the node of the specified uid.
### findNodeByUid(uid)
> v0.6.7+
- `uid`: uid of node
Find the corresponding node instance based on the uid.

View File

@ -62,6 +62,27 @@ is an object, e.g. <code>{text: 'I am new text'}</code></p>
</blockquote>
<p>Move a node to the center of the canvas.</p>
<p>Currently, if there is zoom, returning to the center will reset the zoom.</p>
<h3>expandToNodeUid(uid, callback)</h3>
<blockquote>
<p>v0.6.7+</p>
</blockquote>
<ul>
<li>
<p><code>uid</code>: uid of node</p>
</li>
<li>
<p><code>callback</code>: Expand completed callback function</p>
</li>
</ul>
<p>Expand to the node of the specified uid.</p>
<h3>findNodeByUid(uid)</h3>
<blockquote>
<p>v0.6.7+</p>
</blockquote>
<ul>
<li><code>uid</code>: uid of node</li>
</ul>
<p>Find the corresponding node instance based on the uid.</p>
</div>
</template>

View File

@ -1,5 +1,15 @@
# Changelog
## 0.6.7
修复1.修复节点收起再展开后展开收起按钮占位元素丢失的问题。 2.修复只读模式下可以缩放图片的问题。
新增1.支持根据节点实例或节点uid定位到某个节点。 2.修改节点uid的创建方式导出数据添加节点的uid。
移除1.移除节点过渡效果。
Demo1.添加网站首页。 2.修复大纲里创建新节点时节点样式丢失的问题。 3.修复大纲里编辑节点后按回车或Tab键后编辑文本丢失的问题。 4.优化大纲的节点定位,被收起的节点会自动展开。 5.侧边栏按钮支持收起。 6.优化小屏适配。
## 0.6.6
新增1.支持导出为Xmind新版文件。2.导入Xmind新版文件支持导入节点中的图片。 3.新增竖向时间轴结构。

View File

@ -1,6 +1,11 @@
<template>
<div>
<h1>Changelog</h1>
<h2>0.6.7</h2>
<p>修复1.修复节点收起再展开后展开收起按钮占位元素丢失的问题 2.修复只读模式下可以缩放图片的问题</p>
<p>新增1.支持根据节点实例或节点uid定位到某个节点 2.修改节点uid的创建方式导出数据添加节点的uid</p>
<p>移除1.移除节点过渡效果</p>
<p>Demo1.添加网站首页 2.修复大纲里创建新节点时节点样式丢失的问题 3.修复大纲里编辑节点后按回车或Tab键后编辑文本丢失的问题 4.优化大纲的节点定位被收起的节点会自动展开 5.侧边栏按钮支持收起 6.优化小屏适配</p>
<h2>0.6.6</h2>
<p>新增1.支持导出为Xmind新版文件2.导入Xmind新版文件支持导入节点中的图片 3.新增竖向时间轴结构</p>
<p>修复1.TouchEvent插件不再派发click事件解决移动端点击超链接会打开两个窗口的问题 2.修复拖拽移动一个节点成为另一个节点的子节点时该节点的父节点指向未更新的问题 3.修复二级节点拖拽成三级节点时节点边框样式未更新的问题 4.修复向右生长的结构外其他结构鼠标移入展开收起按钮位置时不会触发按钮显示的问题</p>

View File

@ -340,6 +340,7 @@ mindMap.updateConfig({
| SET_NODE_CUSTOM_POSITIONv0.2.0+ | 设置节点自定义位置 | node要设置的节点、 left自定义的x坐标默认为undefined、 top自定义的y坐标默认为undefined |
| RESET_LAYOUTv0.2.0+ | 一键整理布局 | |
| SET_NODE_SHAPEv0.2.4+ | 设置节点形状 | node要设置的节点、shape形状全部形状[Shape.js](https://github.com/wanglin2/mind-map/blob/main/simple-mind-map/src/core/render/node/Shape.js) |
| GO_TARGET_NODEv0.6.7+ | 定位到某个节点,如果该节点被收起,那么会自动展开到该节点 | node要定位到的节点实例或节点uid |
### setData(data)

View File

@ -915,6 +915,11 @@ mindMap.setTheme(<span class="hljs-string">&#x27;主题名称&#x27;</span>)
<td>设置节点形状</td>
<td>node要设置的节点shape形状全部形状<a href="https://github.com/wanglin2/mind-map/blob/main/simple-mind-map/src/core/render/node/Shape.js">Shape.js</a></td>
</tr>
<tr>
<td>GO_TARGET_NODEv0.6.7+</td>
<td>定位到某个节点如果该节点被收起那么会自动展开到该节点</td>
<td>node要定位到的节点实例或节点uid</td>
</tr>
</tbody>
</table>
<h3>setData(data)</h3>

View File

@ -18,6 +18,9 @@ mindMap.on('data_change', (data) => {
const node = data._node
mindMap.renderer.moveNodeToCenter(node)
node.active()
// 在v0.6.7+版本可以这么做:
mindMap.execCommand('GO_TARGET_NODE', node)// 或者传节点的uid
```
当在大纲树上编辑了某个节点的内容,需要同步到思维导图树上:

View File

@ -13,6 +13,9 @@
<pre class="hljs"><code><span class="hljs-keyword">const</span> node = data._node
mindMap.renderer.moveNodeToCenter(node)
node.active()
<span class="hljs-comment">// v0.6.7+</span>
mindMap.execCommand(<span class="hljs-string">&#x27;GO_TARGET_NODE&#x27;</span>, node)<span class="hljs-comment">// uid</span>
</code></pre>
<p>当在大纲树上编辑了某个节点的内容需要同步到思维导图树上</p>
<pre class="hljs"><code>data._node.setText(<span class="hljs-string">&#x27;xxx&#x27;</span>)

View File

@ -82,4 +82,22 @@
移动节点到画布中心。
目前如果是存在缩放的情况下回到中心会重置缩放。
目前如果是存在缩放的情况下回到中心会重置缩放。
### expandToNodeUid(uid, callback)
> v0.6.7+
- `uid`节点uid
- `callback`:展开完成的回调函数
展开到指定uid的节点。
### findNodeByUid(uid)
> v0.6.7+
- `uid`节点uid
根据uid找到对应的节点实例。

View File

@ -51,6 +51,27 @@
</blockquote>
<p>移动节点到画布中心</p>
<p>目前如果是存在缩放的情况下回到中心会重置缩放</p>
<h3>expandToNodeUid(uid, callback)</h3>
<blockquote>
<p>v0.6.7+</p>
</blockquote>
<ul>
<li>
<p><code>uid</code>节点uid</p>
</li>
<li>
<p><code>callback</code>展开完成的回调函数</p>
</li>
</ul>
<p>展开到指定uid的节点</p>
<h3>findNodeByUid(uid)</h3>
<blockquote>
<p>v0.6.7+</p>
</blockquote>
<ul>
<li><code>uid</code>节点uid</li>
</ul>
<p>根据uid找到对应的节点实例</p>
</div>
</template>