diff --git a/README.md b/README.md index 10fcdb0d..6de6545d 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Github:[releases](https://github.com/wanglin2/mind-map/releases)。百度云 官方提供了如下插件,可根据需求按需引入(某个功能不生效大概率是因为你没有引入对应的插件),具体使用方式请查看文档: -> RichText(节点富文本插件)、Select(鼠标多选节点插件)、Drag(节点拖拽插件)、AssociativeLine(关联线插件)、Export(导出插件)、KeyboardNavigation(键盘导航插件)、MiniMap(小地图插件)、Watermark(水印插件)、TouchEvent(移动端触摸事件支持插件)、NodeImgAdjust(拖拽调整节点图片大小插件)、Search(搜索插件)、Painter(节点格式刷插件)、Scrollbar(滚动条插件)、Formula(数学公式插件)、Cooperate(协同编辑插件)、RainbowLines(彩虹线条插件)、Demonstrate(演示模式插件)、HandDrawnLikeStyle(手绘风格插件)[收费] +> RichText(节点富文本插件)、Select(鼠标多选节点插件)、Drag(节点拖拽插件)、AssociativeLine(关联线插件)、Export(导出插件)、KeyboardNavigation(键盘导航插件)、MiniMap(小地图插件)、Watermark(水印插件)、TouchEvent(移动端触摸事件支持插件)、NodeImgAdjust(拖拽调整节点图片大小插件)、Search(搜索插件)、Painter(节点格式刷插件)、Scrollbar(滚动条插件)、Formula(数学公式插件)、Cooperate(协同编辑插件)、RainbowLines(彩虹线条插件)、Demonstrate(演示模式插件)、HandDrawnLikeStyle(手绘风格插件)[收费]、Notation(节点标记插件)[收费] 本项目不会实现的特性: @@ -385,4 +385,20 @@ const mindMap = new MindMap({ + + + 协成 + + + + 木木 + + + + 好名字 + + + + Kyle +

diff --git a/web/src/assets/avatar/Kyle.jpg b/web/src/assets/avatar/Kyle.jpg new file mode 100644 index 00000000..5d7e507a Binary files /dev/null and b/web/src/assets/avatar/Kyle.jpg differ diff --git a/web/src/assets/avatar/好名字.jpg b/web/src/assets/avatar/好名字.jpg new file mode 100644 index 00000000..9bed8adc Binary files /dev/null and b/web/src/assets/avatar/好名字.jpg differ diff --git a/web/src/assets/avatar/木木.jpg b/web/src/assets/avatar/木木.jpg new file mode 100644 index 00000000..479cb04d Binary files /dev/null and b/web/src/assets/avatar/木木.jpg differ diff --git a/web/src/assets/img/docs/标记.jpg b/web/src/assets/img/docs/标记.jpg new file mode 100644 index 00000000..c7146635 Binary files /dev/null and b/web/src/assets/img/docs/标记.jpg differ diff --git a/web/src/pages/Doc/catalogList.js b/web/src/pages/Doc/catalogList.js index fe876283..33f8b46d 100644 --- a/web/src/pages/Doc/catalogList.js +++ b/web/src/pages/Doc/catalogList.js @@ -41,6 +41,7 @@ let APIList = [ 'rainbowLines', 'handDrawnLikeStyle', 'demonstrate', + 'notation', 'xmind', 'markdown', 'utils' diff --git a/web/src/pages/Doc/en/changelog/index.md b/web/src/pages/Doc/en/changelog/index.md index 16ac9ad3..9293c834 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.10.1 + +Fix: + +> 1.Fix the issue where the TouchEvent plugin triggers node input when clicking twice at different positions; +> +> 2.Fix / shortcut the issue of being able to retrieve child nodes of the root node; + +New: + +> 1.Add instantiation options for handling SVG objects before export; +> +> 2.Add instantiation options for cloned nodes when modifying drag and drop nodes; +> +> 3.Add a content layout completion event for distributing individual nodes; +> +> 4.Add instantiation options for intercepting node drag and drop; +> +> 5.Add instantiation options to restrict the maximum and minimum values of TouchEvent plugin's double finger scaling; +> +> 6.Add a node editing plugin; + +Demo: + +> 1.Add node marking function; +> +> 2.Fix the issue where the input box in the bottom right corner cannot be entered in demonstration mode; +> +> 3.Do not display directory, new, or open buttons when opening on the mobile end; + ## 0.10.0 Major updates: Upgrade the interaction effect when dragging nodes; diff --git a/web/src/pages/Doc/en/changelog/index.vue b/web/src/pages/Doc/en/changelog/index.vue index 01f0a4cd..3e335f33 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/render/index.md b/web/src/pages/Doc/en/render/index.md index 7e037d95..d5b80778 100644 --- a/web/src/pages/Doc/en/render/index.md +++ b/web/src/pages/Doc/en/render/index.md @@ -148,13 +148,13 @@ Move a node in front of another node. Move a node behind another node. -### moveNodeToCenter(node) +### moveNodeToCenter(node, resetScale) > v0.2.17+ -Move a node to the center of the canvas. +- `resetScale`: v0.10.1+, Specify whether to reset the canvas scaling value to 100%. When you do not explicitly pass it, the default value is undefined, because the resetScaleOnMoveNodeToCenter configuration of the instantiation option also determines whether to reset scaling. Therefore, use the resetScaleOnMoveNodeToCenter configuration when you do not explicitly pass it, otherwise use the resetScale configuration -Currently, if there is zoom, returning to the center will reset the zoom. +Move a node to the center of the canvas. ### expandToNodeUid(uid, callback) diff --git a/web/src/pages/Doc/en/render/index.vue b/web/src/pages/Doc/en/render/index.vue index baac675f..31ec72af 100644 --- a/web/src/pages/Doc/en/render/index.vue +++ b/web/src/pages/Doc/en/render/index.vue @@ -121,12 +121,14 @@ is an object, e.g. {text: 'I am new text'}.

v0.1.5+

Move a node behind another node.

-

moveNodeToCenter(node)

+

moveNodeToCenter(node, resetScale)

v0.2.17+

+

Move a node to the center of the canvas.

-

Currently, if there is zoom, returning to the center will reset the zoom.

expandToNodeUid(uid, callback)

v0.6.7+

diff --git a/web/src/pages/Doc/routerList.js b/web/src/pages/Doc/routerList.js index 6cd69cf4..ae445be2 100644 --- a/web/src/pages/Doc/routerList.js +++ b/web/src/pages/Doc/routerList.js @@ -66,6 +66,7 @@ export default [ { path: 'rainbowLines', title: 'RainbowLines插件' }, { path: 'demonstrate', title: 'Demonstrate插件' }, { path: 'handDrawnLikeStyle', title: 'HandDrawnLikeStyle收费插件' }, + { path: 'notation', title: 'Notation收费插件' }, { path: 'help1', title: '概要/关联线' }, { path: 'help2', title: '客户端' }, { path: 'help3', title: '打开预览在线文件' }, @@ -114,6 +115,7 @@ export default [ path: 'handDrawnLikeStyle', title: 'HandDrawnLikeStyle chargeable plugin' }, + { path: 'notation', title: 'Notation 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 e0ca685b..0fc1052b 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.10.1 + +修复: + +> 1.修复TouchEvent插件两次点击位置不同时也会触发节点输入的问题; +> +> 2.修复/快捷键能收起根节点的子节点的问题; + +新增: + +> 1.新增处理导出前的svg对象的实例化选项; +> +> 2.新增修改拖拽节点时克隆的节点的实例化选项; +> +> 3.新增派发单个节点的内容布局完成事件; +> +> 4.新增拦截节点拖拽的实例化选项; +> +> 5.新增限制TouchEvent插件双指缩放的最大值和最小值的实例化选项; +> +> 6.新增节点编辑插件; + +Demo: + +> 1.新增节点标记功能; +> +> 2.修复演示模式中右下角输入框无法输入的问题; +> +> 3.移动端打开时不显示目录、新建、打开按钮; + ## 0.10.0 较大更新:升级节点拖拽时的交互效果; diff --git a/web/src/pages/Doc/zh/changelog/index.vue b/web/src/pages/Doc/zh/changelog/index.vue index 5558bd26..c67be98a 100644 --- a/web/src/pages/Doc/zh/changelog/index.vue +++ b/web/src/pages/Doc/zh/changelog/index.vue @@ -1,6 +1,27 @@ diff --git a/web/src/pages/Doc/zh/notation/index.md b/web/src/pages/Doc/zh/notation/index.md new file mode 100644 index 00000000..3fa0a7c6 --- /dev/null +++ b/web/src/pages/Doc/zh/notation/index.md @@ -0,0 +1,111 @@ +# Notation 收费插件 + +> 关于收费 +> +> mind-map 是一个 MIT 协议的开源项目,理论上只要保留 mind-map 的版权声明,无论是否商用都不收费,这个协议以后也不会改变。另外无论是在线版,还是客户端都不会考虑收费。但是为了项目的可持续发展,会通过一些方式来获取收益,比如现有的赞助方式。而收费插件是第二个方式,基本原则是基本功能、核心功能、必要功能不收费,而可有可无的附加功能可能会做成收费的。 +> +> 最后,收费仅针对开发者,如果仅是在线版或者客户端的思维导图用户是无需付费的,所有功能均可免费使用。 + +Notation 是第二个收费插件,功能是提供单个节点的标记功能,也就是可以在单个节点上加个手绘风格的圈、背景、删除线等等,支持动画效果,就像下面这样: + + + +你也可以在在线版中进行体验,先激活节点,然后点击上方【标记】按钮添加标记。 + +内部实现是通过[rough-notation](https://github.com/rough-stuff/rough-notation)库,所以如果你有精力,也可以自己基于这个库来实现这个插件。 + +## 收费 + +现阶段收费方式比较原始,通过扫码转账备注你要购买的插件,以及你的邮箱地址,然后会将插件文件发送到你的邮箱。购买请在充分的使用和考虑后进行,如果你对前端开发不太熟悉,不知道如何使用插件,那么请谨慎考虑购买,没有特殊原因不会退费。如果你发现了 bug,或者有需求,可以提交相关的 issue。 + +价格: + +1.¥ 19.9,仅包含打包后的文件,即.cjs.min.js、.esm.min.js 两种格式的文件。 + +2.¥ 29.9,包含未打包的源码和打包后的文件。 + + + + + +## 注册 + +1.引用打包后的文件: + +```js +import MindMap from 'simple-mind-map' +import Notation from 'notation.cjs.min.js' +// 或 import Notation from 'notation.esm.min.js' + +MindMap.usePlugin(Notation) +``` + +2.引用未打包的源码 + +可以先进入到插件目录执行: + +```bash +npm link +``` + +然后进入到你的项目根目录执行: + +```bash +npm link simple-mind-map-plugin-notation +``` + +然后就可以直接导入进行使用: + +```js +import MindMap from 'simple-mind-map' +import Notation from 'simple-mind-map-plugin-notation' + +MindMap.usePlugin(Notation) +``` + +注册完且实例化`MindMap`后可通过`mindMap.notation`获取到该实例。 + +注册该插件后,无需执行其他方法,手绘风格即可生效。 + +如果你是使用 mindMap.addPlugin 方法来动态注册的组件,那么需要调用一次重新渲染的方法: + +```js +mindMap.addPlugin(Notation) +mindMap.reRender() +``` + +## 命令 + +注册了本插件后会在思维导图实例上新增`SET_NOTATION`命令,给节点添加标记使用该命令: + +```js +mindMap.execCommand('SET_NOTATION', appointNodes, show, config) +``` + +该命令可以传递三个参数: + +- `appointNodes`:给指定的节点实例添加标记,可以传单个节点实例,也可以传递一个节点实例数组,如果传空数组,则会给当前激活的节点添加标记; + +- `show`:Boolean,必传,是否显示编辑; + +- `config`:Object,可选,标记配置,对象格式,对象的详细字段如下: + +| 字段名称 | 类型 | 默认值 | 描述 | +| ------- | ----- | ----- | ---- | +| type | String | circle | 标记类型,可选值:underline(下划线)、box(边框)、circle(圆)、highlight(高亮)、strike-through(删除线)、crossed-off(叉) | +| color | String | 思维导图实例化选项中的hoverRectColor配置 | 颜色 | +| strokeWidth | Number | 1 | 线宽 | +| padding | Number | 20 | 内边距 | +| animate | Boolean | true | 是否开启动画 | + +示例: + +```js +// 给当前激活的节点添加一个圆类型的标记 +mindMap.execCommand('SET_NOTATION', [], true, { + type: 'circle', + color: 'red' +}) +``` + +添加标记后数据会以`notation`为名称保存到节点的`data`数据中。 \ No newline at end of file diff --git a/web/src/pages/Doc/zh/notation/index.vue b/web/src/pages/Doc/zh/notation/index.vue new file mode 100644 index 00000000..23f6a48a --- /dev/null +++ b/web/src/pages/Doc/zh/notation/index.vue @@ -0,0 +1,125 @@ + + + + + \ No newline at end of file diff --git a/web/src/pages/Doc/zh/render/index.md b/web/src/pages/Doc/zh/render/index.md index 6a6673fc..fc631483 100644 --- a/web/src/pages/Doc/zh/render/index.md +++ b/web/src/pages/Doc/zh/render/index.md @@ -146,13 +146,13 @@ 将节点移动到另一个节点的后面。 -### moveNodeToCenter(node) +### moveNodeToCenter(node, resetScale) > v0.2.17+ -移动节点到画布中心。 +- `resetScale`:v0.10.1+, 指定是否要将画布缩放值复位为100%,当你没有显式传递时,默认值为undefined,因为实例化选项的resetScaleOnMoveNodeToCenter配置也会决定是否复位缩放,所以当你没有显式传递时使用resetScaleOnMoveNodeToCenter配置,否则使用resetScale配置 -目前如果是存在缩放的情况下回到中心会重置缩放。 +移动节点到画布中心。 ### expandToNodeUid(uid, callback) diff --git a/web/src/pages/Doc/zh/render/index.vue b/web/src/pages/Doc/zh/render/index.vue index 492de363..3584c295 100644 --- a/web/src/pages/Doc/zh/render/index.vue +++ b/web/src/pages/Doc/zh/render/index.vue @@ -118,12 +118,14 @@

v0.1.5+

将节点移动到另一个节点的后面。

-

moveNodeToCenter(node)

+

moveNodeToCenter(node, resetScale)

v0.2.17+

+

移动节点到画布中心。

-

目前如果是存在缩放的情况下回到中心会重置缩放。

expandToNodeUid(uid, callback)

v0.6.7+