@ -1,21 +0,0 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2021-2023 The MindMap Team
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
@ -1,15 +0,0 @@
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
|
||||
const src = path.resolve(__dirname, './dist/index.html')
|
||||
const dest = path.resolve(__dirname, './index.html')
|
||||
|
||||
if (fs.existsSync(dest)) {
|
||||
fs.unlinkSync(dest)
|
||||
}
|
||||
|
||||
if (fs.existsSync(src)) {
|
||||
fs.copyFileSync(src, dest)
|
||||
fs.unlinkSync(src)
|
||||
}
|
||||
|
Before Width: | Height: | Size: 695 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 9.9 KiB |
Before Width: | Height: | Size: 9.4 KiB |
Before Width: | Height: | Size: 9.2 KiB |
Before Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 8.4 KiB |
Before Width: | Height: | Size: 8.7 KiB |
Before Width: | Height: | Size: 8.5 KiB |
Before Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 9.7 KiB |
Before Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 9.2 KiB |
Before Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 8.5 KiB |
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 8.3 KiB |
Before Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 9.6 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 9.2 KiB |
Before Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 9.7 KiB |
Before Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 131 KiB |
@ -1 +0,0 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0a3179"],{"0168":function(v,s,n){"use strict";n.r(s);var _=function(){var v=this;v._self._c;return v._m(0)},i=[function(){var v=this,s=v._self._c;return s("div",[s("h1",[v._v("MiniMap插件")]),s("blockquote",[s("p",[v._v("v0.2.11+")])]),s("p",[v._v("用于帮助快速开发小地图功能,小地图由两部分组成,一个是当前的画布内容,一个是视口框,当缩放、移动、元素过多时画布上可能只显示了思维导图的部分内容,可以通过视口框来查看当前视口所在位置,以及可以通过在小地图上拖动来快速定位。")]),s("h2",[v._v("注册")]),s("pre",{staticClass:"hljs"},[s("code",[s("span",{staticClass:"hljs-keyword"},[v._v("import")]),v._v(" MindMap "),s("span",{staticClass:"hljs-keyword"},[v._v("from")]),v._v(" "),s("span",{staticClass:"hljs-string"},[v._v("'simple-mind-map'")]),v._v("\n"),s("span",{staticClass:"hljs-keyword"},[v._v("import")]),v._v(" MiniMap "),s("span",{staticClass:"hljs-keyword"},[v._v("from")]),v._v(" "),s("span",{staticClass:"hljs-string"},[v._v("'simple-mind-map/src/plugins/MiniMap.js'")]),v._v("\n"),s("span",{staticClass:"hljs-comment"},[v._v("// import MiniMap from 'simple-mind-map/src/MiniMap.js' v0.6.0以下版本使用该路径")]),v._v("\n\nMindMap.usePlugin(MiniMap)\n")])]),s("p",[v._v("注册完且实例化"),s("code",[v._v("MindMap")]),v._v("后可通过"),s("code",[v._v("mindMap.miniMap")]),v._v("获取到该实例。")]),s("h2",[v._v("方法")]),s("h3",[v._v("calculationMiniMap(boxWidth, boxHeight)")]),s("p",[v._v("计算小地图的渲染数据,该函数内会调用"),s("code",[v._v("getMiniMap()")]),v._v("方法,所以一般使用该函数即可。")]),s("p",[s("code",[v._v("boxWidth")]),v._v(":小地图容器的宽度")]),s("p",[s("code",[v._v("boxHeight")]),v._v(":小地图容器的高度")]),s("p",[v._v("函数返回内容:")]),s("pre",{staticClass:"hljs"},[s("code",[v._v("{\n svgHTML, "),s("span",{staticClass:"hljs-comment"},[v._v("// 小地图html")]),v._v("\n viewBoxStyle, "),s("span",{staticClass:"hljs-comment"},[v._v("// 视图框的位置信息")]),v._v("\n miniMapBoxScale, "),s("span",{staticClass:"hljs-comment"},[v._v("// 视图框的缩放值")]),v._v("\n miniMapBoxLeft, "),s("span",{staticClass:"hljs-comment"},[v._v("// 视图框的left值")]),v._v("\n miniMapBoxTop, "),s("span",{staticClass:"hljs-comment"},[v._v("// 视图框的top值")]),v._v("\n}\n")])]),s("p",[v._v("小地图思路:")]),s("p",[v._v("1.准备一个容器元素"),s("code",[v._v("container")]),v._v(",定位不为"),s("code",[v._v("static")])]),s("p",[v._v("2.在"),s("code",[v._v("container")]),v._v("内创建一个小地图容器元素"),s("code",[v._v("miniMapContainer")]),v._v(",绝对定位")]),s("p",[v._v("3.在"),s("code",[v._v("container")]),v._v("内创建一个视口框元素"),s("code",[v._v("viewBoxContainer")]),v._v(",绝对定位,设置边框样式,过渡属性(可选)")]),s("p",[v._v("4.监听"),s("code",[v._v("data_change")]),v._v("和"),s("code",[v._v("view_data_change")]),v._v("事件,在该事件内调用"),s("code",[v._v("calculationMiniMap")]),v._v("方法获取计算数据,然后将"),s("code",[v._v("svgHTML")]),v._v("渲染到"),s("code",[v._v("miniMapContainer")]),v._v("元素内,并且设置"),s("code",[v._v("miniMapContainer")]),v._v("元素的样式:")]),s("pre",{staticClass:"hljs"},[s("code",[v._v(":style="),s("span",{staticClass:"hljs-string"},[v._v("\"{\n transform: `scale(${miniMapBoxScale})`,\n left: miniMapBoxLeft + 'px',\n top: miniMapBoxTop + 'px',\n}\"")]),v._v("\n")])]),s("p",[v._v("5.将"),s("code",[v._v("viewBoxStyle")]),v._v("对象设置为"),s("code",[v._v("viewBoxContainer")]),v._v("元素的样式")]),s("p",[v._v("到这一步,当画布上的思维导图变化了,小地图也会实时更新,并且视口框元素会实时反映视口在思维导图图形上的位置")]),s("p",[v._v("6.监听"),s("code",[v._v("container")]),v._v("元素的"),s("code",[v._v("mousedown")]),v._v("、"),s("code",[v._v("mousemove")]),v._v("、"),s("code",[v._v("mouseup")]),v._v("事件,分别调用下面即将介绍的三个方法即可实现鼠标拖动时画布上的思维导图也随之拖动的效果")]),s("h3",[v._v("onMousedown(e)")]),s("p",[v._v("小地图鼠标按下事件执行该函数")]),s("p",[s("code",[v._v("e")]),v._v(":事件对象")]),s("h3",[v._v("onMousemove(e, sensitivityNum = 5)")]),s("p",[v._v("小地图鼠标移动事件执行该函数")]),s("p",[s("code",[v._v("e")]),v._v(":事件对象")]),s("p",[s("code",[v._v("sensitivityNum")]),v._v(":拖动灵敏度,灵敏度越大,在小地图上拖动相同距离时实际上的画布拖动距离就越大")]),s("h3",[v._v("onMouseup()")]),s("p",[v._v("小地图鼠标松开事件执行该函数")])])}],a={},e=a,o=n("2877"),t=Object(o["a"])(e,_,i,!1,null,null,null);s["default"]=t.exports}}]);
|
@ -1 +0,0 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0a514a"],{"08d0":function(s,a,t){"use strict";t.r(a);var n=function(){var s=this;s._self._c;return s._m(0)},v=[function(){var s=this,a=s._self._c;return a("div",[a("h1",[s._v("Markdown解析")]),a("blockquote",[a("p",[s._v("v0.4.7+")])]),a("p",[s._v("提供导入和导出"),a("code",[s._v("Markdown")]),s._v("文件的方法。")]),a("h2",[s._v("引入")]),a("pre",{staticClass:"hljs"},[a("code",[a("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" markdown "),a("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),a("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map/src/parse/markdown.js'")]),s._v("\n")])]),a("p",[s._v("如果使用的是"),a("code",[s._v("umd")]),s._v("格式的文件,那么可以通过如下方式获取:")]),a("pre",{staticClass:"hljs"},[a("code",[a("span",{staticClass:"hljs-tag"},[s._v("<"),a("span",{staticClass:"hljs-name"},[s._v("script")]),s._v(" "),a("span",{staticClass:"hljs-attr"},[s._v("src")]),s._v("="),a("span",{staticClass:"hljs-string"},[s._v('"simple-mind-map/dist/simpleMindMap.umd.min.js"')]),s._v(">")]),a("span",{staticClass:"hljs-tag"},[s._v("</"),a("span",{staticClass:"hljs-name"},[s._v("script")]),s._v(">")]),s._v("\n")])]),a("pre",{staticClass:"hljs"},[a("code",[s._v("simpleMindMap.markdown\n")])]),a("h2",[s._v("方法")]),a("h3",[s._v("transformToMarkdown(data)")]),a("ul",[a("li",[a("code",[s._v("data")]),s._v(":思维导图数据,可以通过"),a("code",[s._v("mindMap.getData()")]),s._v("方法获取。")])]),a("p",[s._v("将思维导图数据转换成"),a("code",[s._v("Markdown")]),s._v("格式数据,返回的是字符串。")]),a("h3",[s._v("transformMarkdownTo(mdContent)")]),a("ul",[a("li",[a("code",[s._v("mdContent")]),s._v(":要转换的"),a("code",[s._v("Markdown")]),s._v("数据,字符串类型。")])]),a("p",[s._v("将"),a("code",[s._v("Markdown")]),s._v("字符串转换成节点树数据,返回一个"),a("code",[s._v("Promise")]),s._v("实例。可以使用"),a("code",[s._v("mindMap.setData()")]),s._v("方法将转换后的数据渲染到画布上。")])])}],_={},d=_,o=t("2877"),l=Object(o["a"])(d,n,v,!1,null,null,null);a["default"]=l.exports}}]);
|
@ -1 +0,0 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0aa579"],{1136:function(v,_,e){"use strict";e.r(_);var c=function(){var v=this;v._self._c;return v._m(0)},o=[function(){var v=this,_=v._self._c;return _("div",[_("h1",[v._v("参与翻译")]),_("blockquote",[_("p",[v._v("感谢"),_("a",{attrs:{href:"https://github.com/emircanerkul"}},[v._v("Emircan ERKUL")]),v._v("提供的第一版英文翻译。")]),_("p",[v._v("因为精力有限,目前大部分翻译都是使用机翻的,所以准确度难免有问题。")]),_("p",[v._v("目前【教程】部分是没有进行翻译的,如果你有兴趣,欢迎加入我们。")])]),_("p",[v._v("如果你也想参与翻译本文档的话,可以先克隆本仓库。")]),_("p",[v._v("翻译的文档在"),_("code",[v._v("/web/src/pages/Doc/")]),v._v("目录下,目前支持英文("),_("code",[v._v("en")]),v._v(")、简体中文("),_("code",[v._v("zh")]),v._v(")两种语言。")]),_("p",[v._v("如果是新增一种语言类型,那么可以在"),_("code",[v._v("/web/src/pages/Doc/")]),v._v("目录下创建一个新目录,然后给每个章节创建一个文件夹,你也可以直接复制已存在的语言目录下的所有章节目录进行翻译,注意,你只需要编写"),_("code",[v._v("index.md")]),v._v("文件,章节目录下的"),_("code",[v._v("index.vue")]),v._v("文件是脚本根据"),_("code",[v._v("index.md")]),v._v("自动生成的。")]),_("p",[v._v("如果是给已存在的语言类型新增翻译章节,可以在目标语言目录下创建新的章节目录,目录下只需要创建"),_("code",[v._v("index.md")]),v._v("文件即可。")]),_("p",[v._v("当你完成翻译后,可以直接提交"),_("code",[v._v("Pull requests")]),v._v("。")]),_("p",[v._v("如果你是前端程序员,想运行服务,查看文档页面的效果,如果新增章节,需要修改"),_("code",[v._v("/web/src/pages/Doc/catalogList.js")]),v._v("文件,在"),_("code",[v._v("StartList")]),v._v("或者"),_("code",[v._v("APIList")]),v._v("数组里选择合适的位置插入新章节的"),_("code",[v._v("path")]),v._v("。然后需要在"),_("code",[v._v("web")]),v._v("目录下运行"),_("code",[v._v("npm run buildDoc")]),v._v("编译目录和路由,最后"),_("code",[v._v("npm run serve")]),v._v("启动本地服务,打开以下路径即可查看文档:")]),_("p",[_("code",[v._v("ip:port/#/doc/zh/introduction")])])])}],d={},n=d,t=e("2877"),p=Object(t["a"])(n,c,o,!1,null,null,null);_["default"]=p.exports}}]);
|
@ -1 +0,0 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0abe0f"],{"16c7":function(t,e,o){"use strict";o.r(e);var a=function(){var t=this;t._self._c;return t._m(0)},n=[function(){var t=this,e=t._self._c;return e("div",[e("h1",[t._v("View instance")]),e("p",[t._v("The "),e("code",[t._v("view")]),t._v(" instance is responsible for view operations, and can be obtained through "),e("code",[t._v("mindMap.view")])]),e("h2",[t._v("Methods")]),e("h3",[t._v("fit()")]),e("blockquote",[e("p",[t._v("v0.6.0+")])]),e("p",[t._v("Zoom the mind map to fit the canvas.")]),e("h3",[t._v("translateX(step)")]),e("p",[t._v("Translate in the "),e("code",[t._v("x")]),t._v(" direction, "),e("code",[t._v("step")]),t._v(": number of pixels to translate")]),e("h3",[t._v("translateY(step)")]),e("p",[t._v("Translate in the "),e("code",[t._v("y")]),t._v(" direction, "),e("code",[t._v("step")]),t._v(": number of pixels to translate")]),e("h3",[t._v("translateXTo(x)")]),e("blockquote",[e("p",[t._v("v0.2.11+")])]),e("p",[t._v("Translate the "),e("code",[t._v("x")]),t._v(" direction to a specific position")]),e("h3",[t._v("translateYTo(y)")]),e("blockquote",[e("p",[t._v("v0.2.11+")])]),e("p",[t._v("Translate the "),e("code",[t._v("y")]),t._v(" direction to a specific position")]),e("h3",[t._v("reset()")]),e("p",[t._v("Revert to the default transformation")]),e("h3",[t._v("narrow()")]),e("p",[t._v("Zoom out")]),e("h3",[t._v("enlarge()")]),e("p",[t._v("Zoom in")]),e("h3",[t._v("getTransformData()")]),e("blockquote",[e("p",[t._v("v0.1.1+")])]),e("p",[t._v("Get the current transform data, can be used for display")]),e("h3",[t._v("setTransformData(data)")]),e("blockquote",[e("p",[t._v("v0.1.1+")])]),e("p",[t._v('Dynamically set transform data, transform data can be obtained through the getTransformData method"')]),e("h3",[t._v("setScale(scale)")]),e("blockquote",[e("p",[t._v("v0.2.17+")])]),e("p",[t._v("Setting Zoom")])])}],v={},r=v,s=o("2877"),_=Object(s["a"])(r,a,n,!1,null,null,null);e["default"]=_.exports}}]);
|
@ -1 +0,0 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0b1c6f"],{"20fa":function(s,v,e){"use strict";e.r(v);var i=function(){var s=this;s._self._c;return s._m(0)},_=[function(){var s=this,v=s._self._c;return v("div",[v("h1",[s._v("AssociativeLine 插件")]),v("blockquote",[v("p",[s._v("v0.4.5+")])]),v("blockquote",[v("p",[s._v("调整关联线控制点的功能从v0.4.6+开始支持")])]),v("blockquote",[v("p",[s._v("关联性支持文本编辑从v0.5.11+开始支持")])]),v("p",[s._v("该插件用于支持添加关联线。")]),v("h2",[s._v("注册")]),v("pre",{staticClass:"hljs"},[v("code",[v("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" MindMap "),v("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),v("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map'")]),s._v("\n"),v("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" AssociativeLine "),v("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),v("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map/src/plugins/AssociativeLine.js'")]),s._v("\n"),v("span",{staticClass:"hljs-comment"},[s._v("// import AssociativeLine from 'simple-mind-map/src/AssociativeLine.js' v0.6.0以下版本使用该路径")]),s._v("\n\nMindMap.usePlugin(AssociativeLine)\n")])]),v("p",[s._v("注册完且实例化"),v("code",[s._v("MindMap")]),s._v("后可通过"),v("code",[s._v("mindMap.associativeLine")]),s._v("获取到该实例。")]),v("h2",[s._v("配置")]),v("p",[s._v("支持修改关联线的粗细和颜色,分为默认状态和激活状态。配置如下:")]),v("ul",[v("li",[v("p",[v("code",[s._v("associativeLineWidth")]),s._v(":关联线默认状态的粗细,默认值为"),v("code",[s._v("2")])])]),v("li",[v("p",[v("code",[s._v("associativeLineColor")]),s._v(":关联线默认状态的颜色,默认值为"),v("code",[s._v("rgb(51, 51, 51)")])])]),v("li",[v("p",[v("code",[s._v("associativeLineActiveWidth")]),s._v(":关联线激活状态的粗细,默认值为"),v("code",[s._v("8")])])]),v("li",[v("p",[v("code",[s._v("associativeLineActiveColor")]),s._v(":关联线激活状态的颜色,默认值为"),v("code",[s._v("rgba(2, 167, 240, 1)")])])])]),v("p",[s._v("配置以主题的方式提供,所以如果想要修改这四个属性,可以通过"),v("code",[s._v("mindMap.setThemeConfig(config)")]),s._v("方法进行修改。")]),v("h2",[s._v("属性")]),v("h3",[s._v("mindMap.associativeLine.lineList")]),v("p",[s._v("当前所有连接线数据,数组类型,数组的每一项也是一个数组:")]),v("pre",{staticClass:"hljs"},[v("code",[s._v("[\n path, "),v("span",{staticClass:"hljs-comment"},[s._v("// 连接线节点")]),s._v("\n clickPath, "),v("span",{staticClass:"hljs-comment"},[s._v("// 不可见的点击线节点")]),s._v("\n node, "),v("span",{staticClass:"hljs-comment"},[s._v("// 起始节点")]),s._v("\n toNode "),v("span",{staticClass:"hljs-comment"},[s._v("// 目标节点")]),s._v("\n]\n")])]),v("h3",[s._v("mindMap.associativeLine.activeLine")]),v("p",[s._v("当前激活的连接线,数组类型,同"),v("code",[s._v("lineList")]),s._v("数组的每一项的结构。")]),v("h2",[s._v("方法")]),v("h3",[s._v("renderAllLines()")]),v("p",[s._v("重新渲染所有关联线。")]),v("h3",[s._v("removeAllLines()")]),v("p",[s._v("移除所有关联线。")]),v("h3",[s._v("createLineFromActiveNode()")]),v("p",[s._v("从当前激活节点开始创建关联线,如果有多个激活节点,默认为第一个节点。")]),v("p",[s._v("调用该方法后,会从第一个激活节点到当前鼠标实时位置渲染一条关联线,当点击某个目标节点后则代表创建完成,会在第一个激活节点和点击节点之间渲染一条关联线。")]),v("h3",[s._v("createLine(fromNode)")]),v("p",[s._v("从指定节点开始创建关联线。")]),v("p",[s._v("调用该方法后,会从指定节点到当前鼠标实时位置渲染一条关联线,当点击某个目标节点后则代表创建完成,会在指定节点和点击节点之间渲染一条关联线。")]),v("h3",[s._v("addLine(fromNode, toNode)")]),v("p",[s._v("直接添加一条关联线。")]),v("p",[s._v("调用该方法,会直接创建一条从"),v("code",[s._v("fromNode")]),s._v("到"),v("code",[s._v("toNode")]),s._v("节点的关联线。")]),v("h3",[s._v("removeLine()")]),v("p",[s._v("删除当前激活的关联线。点击某条关联线则视为激活。")]),v("h3",[s._v("clearActiveLine()")]),v("p",[s._v("清除当前激活的关联线的激活状态。")])])}],n={},a=n,o=e("2877"),t=Object(o["a"])(a,i,_,!1,null,null,null);v["default"]=t.exports}}]);
|
@ -1 +0,0 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0b361e"],{"27ad":function(s,a,t){"use strict";t.r(a);var e=function(){var s=this;s._self._c;return s._m(0)},n=[function(){var s=this,a=s._self._c;return a("div",[a("h1",[s._v("Watermark plugin")]),a("blockquote",[a("p",[s._v("0.2.24+")])]),a("p",[a("code",[s._v("Watermark")]),s._v(" instance is responsible for displaying the watermark.")]),a("p",[s._v("Please refer to the "),a("a",{attrs:{href:"/mind-map/#/doc/zh/constructor"}},[s._v("Instantiation Options")]),s._v(" of the "),a("code",[s._v("MindMap")]),s._v(" class for configuration.")]),a("h2",[s._v("Register")]),a("pre",{staticClass:"hljs"},[a("code",[a("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" MindMap "),a("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),a("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map'")]),s._v("\n"),a("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" Watermark "),a("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),a("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map/src/plugins/Watermark.js'")]),s._v("\n"),a("span",{staticClass:"hljs-comment"},[s._v("// import Watermark from 'simple-mind-map/src/Watermark.js' Use this path for versions below v0.6.0")]),s._v("\n\nMindMap.usePlugin(Watermark)\n")])]),a("p",[s._v("After registration and instantiation of "),a("code",[s._v("MindMap")]),s._v(", the instance can be obtained through "),a("code",[s._v("mindMap.watermark")]),s._v(".")]),a("h2",[s._v("Methods")]),a("h3",[s._v("draw()")]),a("p",[s._v("Redraw the watermark.")]),a("p",[s._v("Note: For imprecise rendering, some watermarks beyond the visible area will be drawn. If you have extreme performance requirements, it is recommended to develop the watermark function yourself.")]),a("h3",[s._v("updateWatermark(config)")]),a("p",[s._v("Update watermark config. Example:")]),a("pre",{staticClass:"hljs"},[a("code",[s._v("mindMap.watermark.updateWatermark({\n "),a("span",{staticClass:"hljs-attr"},[s._v("text")]),s._v(": "),a("span",{staticClass:"hljs-string"},[s._v("'Watermark text'")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("lineSpacing")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("100")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("textSpacing")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("100")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("angle")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("50")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("textStyle")]),s._v(": {\n "),a("span",{staticClass:"hljs-attr"},[s._v("color")]),s._v(": "),a("span",{staticClass:"hljs-string"},[s._v("'#000'")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("opacity")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("1")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("fontSize")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("20")]),s._v("\n }\n})\n")])]),a("h3",[s._v("hasWatermark()")]),a("blockquote",[a("p",[s._v("v0.3.2+")])]),a("p",[s._v("Gets whether the watermark exists.")])])}],r={},i=r,l=t("2877"),v=Object(l["a"])(i,e,n,!1,null,null,null);a["default"]=v.exports}}]);
|
@ -1 +0,0 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0b91e5"],{"321a":function(s,e,t){"use strict";t.r(e);var n=function(){var s=this;s._self._c;return s._m(0)},l=[function(){var s=this,e=s._self._c;return e("div",[e("h1",[s._v("Select 插件")]),e("p",[e("code",[s._v("Select")]),s._v("插件提供鼠标右键多选节点的功能。")]),e("h2",[s._v("注册")]),e("pre",{staticClass:"hljs"},[e("code",[e("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" MindMap "),e("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),e("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map'")]),s._v("\n"),e("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" Select "),e("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),e("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map/src/plugins/Select.js'")]),s._v("\n"),e("span",{staticClass:"hljs-comment"},[s._v("// import Select from 'simple-mind-map/src/Select.js' v0.6.0以下版本使用该路径")]),s._v("\n\nMindMap.usePlugin(Select)\n")])]),e("p",[s._v("注册完且实例化"),e("code",[s._v("MindMap")]),s._v("后可通过"),e("code",[s._v("mindMap.select")]),s._v("获取到该实例。")]),e("h2",[s._v("方法")]),e("h3",[s._v("toPos(x, y)")]),e("p",[s._v("转换鼠标位置为相对于容器"),e("code",[s._v("el")]),s._v("的位置")])])}],a={},c=a,i=t("2877"),v=Object(i["a"])(c,n,l,!1,null,null,null);e["default"]=v.exports}}]);
|
@ -1 +0,0 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0bd54e"],{"2c18":function(e,o,v){"use strict";v.r(o);var t=function(){var e=this;e._self._c;return e._m(0)},n=[function(){var e=this,o=e._self._c;return o("div",[o("h1",[e._v("KeyboardNavigation插件")]),o("blockquote",[o("p",[e._v("v0.2.17+")])]),o("p",[o("code",[e._v("KeyboardNavigation")]),e._v("插件提供键盘导航的功能,也就是当你按下方向键时会自动寻找下一个节点并激活")]),o("h2",[e._v("注册")]),o("pre",{staticClass:"hljs"},[o("code",[o("span",{staticClass:"hljs-keyword"},[e._v("import")]),e._v(" MindMap "),o("span",{staticClass:"hljs-keyword"},[e._v("from")]),e._v(" "),o("span",{staticClass:"hljs-string"},[e._v("'simple-mind-map'")]),e._v("\n"),o("span",{staticClass:"hljs-keyword"},[e._v("import")]),e._v(" KeyboardNavigation "),o("span",{staticClass:"hljs-keyword"},[e._v("from")]),e._v(" "),o("span",{staticClass:"hljs-string"},[e._v("'simple-mind-map/src/plugins/KeyboardNavigation.js'")]),e._v("\n"),o("span",{staticClass:"hljs-comment"},[e._v("// import KeyboardNavigation from 'simple-mind-map/src/KeyboardNavigation.js' v0.6.0以下版本使用该路径")]),e._v("\n\nMindMap.usePlugin(KeyboardNavigation)\n")])]),o("p",[e._v("注册完且实例化"),o("code",[e._v("MindMap")]),e._v("后可通过"),o("code",[e._v("mindMap.keyboardNavigation")]),e._v("获取到该实例。")]),o("h2",[e._v("方法")]),o("h3",[e._v("focus(dir)")]),o("p",[o("code",[e._v("dir")]),e._v(":要寻找哪个方向的下一个节点,可选值:"),o("code",[e._v("Left")]),e._v("、 "),o("code",[e._v("Up")]),e._v("、 "),o("code",[e._v("Right")]),e._v("、 "),o("code",[e._v("Down")])]),o("p",[e._v("聚焦到下一个节点")]),o("h3",[e._v("getNodeRect(node)")]),o("p",[o("code",[e._v("node")]),e._v(":节点")]),o("p",[e._v("获取节点的位置信息,返回一个对象:")]),o("pre",{staticClass:"hljs"},[o("code",[e._v("{\n left,\n top,\n right,\n bottom\n}\n")])]),o("h3",[e._v("getDistance(node1Rect, node2Rect)")]),o("p",[o("code",[e._v("node1Rect")]),e._v("、"),o("code",[e._v("node2Rect")]),e._v(":节点的位置数据,可通过"),o("code",[e._v("getNodeRect(node)")]),e._v("方法获取")]),o("p",[e._v("获取两个节点的距离")]),o("h3",[e._v("getCenter(nodeRect)")]),o("p",[o("code",[e._v("nodeRect")]),e._v(":节点的位置数据,可通过"),o("code",[e._v("getNodeRect(node)")]),e._v("方法获取")]),o("p",[e._v("获取节点的中心点")])])}],s={},a=s,_=v("2877"),d=Object(_["a"])(a,t,n,!1,null,null,null);o["default"]=d.exports}}]);
|
@ -1 +0,0 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0be174"],{"2f7a":function(t,e,s){"use strict";s.r(e);var a=function(){var t=this;t._self._c;return t._m(0)},n=[function(){var t=this,e=t._self._c;return e("div",[e("h1",[t._v("KeyCommand instance")]),e("p",[t._v("The "),e("code",[t._v("keyCommand")]),t._v(" instance is responsible for adding and triggering shortcuts. It includes some built-in shortcuts and can also be added manually. The "),e("code",[t._v("mindMap.keyCommand")]),t._v(" instance can be obtained through this.")]),e("h2",[t._v("Methods")]),e("h3",[t._v("addShortcut(key, fn)")]),e("p",[t._v("Add a shortcut")]),e("p",[e("code",[t._v("key")]),t._v(": Shortcut key, key values can be viewed at "),e("a",{attrs:{href:"https://github.com/wanglin2/mind-map/blob/main/simple-mind-map/src/core/command/keyMap.js"}},[t._v("keyMap.js")]),t._v(" Example:")]),e("pre",{staticClass:"hljs"},[e("code",[e("span",{staticClass:"hljs-comment"},[t._v("// Single key")]),t._v("\nmindMap.keyCommand.addShortcut("),e("span",{staticClass:"hljs-string"},[t._v('"Enter"')]),t._v(", "),e("span",{staticClass:"hljs-function"},[t._v("() =>")]),t._v(" {});\n"),e("span",{staticClass:"hljs-comment"},[t._v("// Or")]),t._v("\nmindMap.keyCommand.addShortcut("),e("span",{staticClass:"hljs-string"},[t._v('"Del|Backspace"')]),t._v(", "),e("span",{staticClass:"hljs-function"},[t._v("() =>")]),t._v(" {});\n"),e("span",{staticClass:"hljs-comment"},[t._v("// Combination key")]),t._v("\nmindMap.keyCommand.addShortcut("),e("span",{staticClass:"hljs-string"},[t._v('"Control+Enter"')]),t._v(", "),e("span",{staticClass:"hljs-function"},[t._v("() =>")]),t._v(" {});\n")])]),e("p",[e("code",[t._v("fn")]),t._v(": Method to be executed")]),e("h3",[t._v("removeShortcut(key, fn)")]),e("p",[t._v("Remove a shortcut command, if "),e("code",[t._v("fn")]),t._v(" is not specified, all callback methods for the shortcut will be removed")]),e("h3",[t._v("getShortcutFn(key)")]),e("blockquote",[e("p",[t._v("v0.2.2+")])]),e("p",[t._v("Get the processing function for the specified shortcut")]),e("h3",[t._v("pause()")]),e("blockquote",[e("p",[t._v("v0.2.2+")])]),e("p",[t._v("Pause all shortcut responses")]),e("h3",[t._v("recovery()")]),e("blockquote",[e("p",[t._v("v0.2.2+")])]),e("p",[t._v("Restore shortcut responses")]),e("h3",[t._v("save()")]),e("blockquote",[e("p",[t._v("v0.2.3+")])]),e("p",[t._v("Save the current registered shortcut data, then clear the shortcut data")]),e("h3",[t._v("restore()")]),e("blockquote",[e("p",[t._v("v0.2.3+")])]),e("p",[t._v("Restore saved shortcut data, then clear the cache data")])])}],o={},c=o,v=s("2877"),r=Object(v["a"])(c,a,n,!1,null,null,null);e["default"]=r.exports}}]);
|
@ -1 +0,0 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0c14fc"],{4604:function(s,a,n){"use strict";n.r(a);var t=function(){var s=this;s._self._c;return s._m(0)},r=[function(){var s=this,a=s._self._c;return a("div",[a("h1",[s._v("Drag插件")]),a("p",[a("code",[s._v("Drag")]),s._v("插件提供节点拖拽的功能,包括:")]),a("p",[s._v("1.拖拽节点进行移动,改变节点在节点树中的位置,即作为其他节点的子节点、兄弟节点等等")]),a("p",[s._v("2.拖拽节点到自定义的画布位置")]),a("p",[s._v("配置请参考"),a("code",[s._v("MindMap")]),s._v("类的"),a("a",{attrs:{href:"/mind-map/#/doc/zh/constructor"}},[s._v("实例化选项")]),s._v("。")]),a("h2",[s._v("注册")]),a("pre",{staticClass:"hljs"},[a("code",[a("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" MindMap "),a("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),a("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map'")]),s._v("\n"),a("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" Drag "),a("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),a("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map/src/plugins/Drag.js'")]),s._v("\n"),a("span",{staticClass:"hljs-comment"},[s._v("// import Drag from 'simple-mind-map/src/Drag.js' v0.6.0以下版本使用该路径")]),s._v("\n\nMindMap.usePlugin(Drag)\n")])]),a("p",[s._v("注册完且实例化"),a("code",[s._v("MindMap")]),s._v("后可通过"),a("code",[s._v("mindMap.drag")]),s._v("获取到该实例。")])])}],i={},p=i,v=n("2877"),_=Object(v["a"])(p,t,r,!1,null,null,null);a["default"]=_.exports}}]);
|
@ -1 +0,0 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0c1a01"],{"479a":function(e,t,r){"use strict";r.r(t);var o=function(){var e=this;e._self._c;return e._m(0)},n=[function(){var e=this,t=e._self._c;return t("div",[t("h1",[e._v("Participate in translation")]),t("blockquote",[t("p",[e._v("Thanks for the first version English translation provided by "),t("a",{attrs:{href:"https://github.com/emircanerkul"}},[e._v("Emircan ERKUL")]),e._v(".")]),t("p",[e._v("Due to limited energy, most translations currently use machine translation, so accuracy is inevitably problematic.")]),t("p",[e._v("At present, the 【Course】 section is not translated. If you are interested, please join us.")])]),t("p",[e._v("If you want to participate in the translation of this document, you can clone this repository first.")]),t("p",[e._v("The translated documents are in the "),t("code",[e._v("/web/src/pages/Doc/")]),e._v(" directory, and currently support English("),t("code",[e._v("en")]),e._v(") and Simplified Chinese("),t("code",[e._v("zh")]),e._v(").")]),t("p",[e._v("If you are adding a new language type, you can create a new directory under the "),t("code",[e._v("/web/src/pages/Doc/")]),e._v(" directory, Then create a folder for each chapter, You can also directly copy all chapter directories under the existing language directory for translation, Note that you only need to write the "),t("code",[e._v("index.md")]),e._v(" file, The "),t("code",[e._v("index.vue")]),e._v(" file under the chapter directory is automatically generated by the script according to "),t("code",[e._v("index.md")]),e._v(".")]),t("p",[e._v("If you are adding a translation chapter to an existing language type, You can create a new chapter directory under the target language directory, You only need to create a "),t("code",[e._v("index.md")]),e._v(" file under the directory.")]),t("p",[e._v("After you complete the translation, you can directly submit "),t("code",[e._v("Pull requests")]),e._v(".")]),t("p",[e._v("If you are a front-end programmer and want to run the service, check the effect of the document page, If a new chapter is added, the file "),t("code",[e._v("/web/src/pages/Doc/catalogList.js")]),e._v(" needs to be modified, Select the appropriate location in the "),t("code",[e._v("StartList")]),e._v(" or "),t("code",[e._v("APIList")]),e._v(" array to insert the "),t("code",[e._v("path")]),e._v(" of the new chapter. Then you need to run "),t("code",[e._v("npm run buildDoc")]),e._v(" under the "),t("code",[e._v("web")]),e._v(" directory to compile the directory and route. Finally, run "),t("code",[e._v("npm run serve")]),e._v(" starts the local service. Open the following path to view the document:")]),t("p",[t("code",[e._v("ip:port/#/doc/zh/introduction")])])])}],a={},i=a,c=r("2877"),d=Object(c["a"])(i,o,n,!1,null,null,null);t["default"]=d.exports}}]);
|
@ -1 +0,0 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0db0f2"],{"6df4":function(n,v,_){"use strict";_.r(v);var e=function(){var n=this;n._self._c;return n._m(0)},o=[function(){var n=this,v=n._self._c;return v("div",[v("h1",[n._v("Command实例")]),v("p",[v("code",[n._v("command")]),n._v("实例负责命令的添加及执行,内置了很多命令,也可以自行添加,命令指需要在历史堆栈数据里添加副本的操作。可通过"),v("code",[n._v("mindMap.command")]),n._v("获取到该实例")]),v("h2",[n._v("方法")]),v("h3",[n._v("add(name, fn)")]),v("p",[n._v("添加命令。")]),v("p",[v("code",[n._v("name")]),n._v(":命令名称")]),v("p",[v("code",[n._v("fn")]),n._v(":命令要执行的方法")]),v("h3",[n._v("remove(name, fn)")]),v("p",[n._v("移除命令。")]),v("p",[v("code",[n._v("name")]),n._v(":要移除的命令名称")]),v("p",[v("code",[n._v("fn")]),n._v(":要移除的方法,不传的话移除该命令所有的方法")]),v("h3",[n._v("getCopyData()")]),v("p",[n._v("获取渲染树数据副本")]),v("h3",[n._v("clearHistory()")]),v("p",[n._v("清空历史堆栈数据")])])}],a={},c=a,d=_("2877"),p=Object(d["a"])(c,e,o,!1,null,null,null);v["default"]=p.exports}}]);
|
@ -1 +0,0 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0dd3b1"],{8102:function(a,t,s){"use strict";s.r(t);var n=function(){var a=this;a._self._c;return a._m(0)},e=[function(){var a=this,t=a._self._c;return t("div",[t("h1",[a._v("Markdown parse")]),t("blockquote",[t("p",[a._v("v0.4.7+")])]),t("p",[a._v("Provides methods for importing and exporting "),t("code",[a._v("Markdown")]),a._v(" files.")]),t("h2",[a._v("Import")]),t("pre",{staticClass:"hljs"},[t("code",[t("span",{staticClass:"hljs-keyword"},[a._v("import")]),a._v(" markdown "),t("span",{staticClass:"hljs-keyword"},[a._v("from")]),a._v(" "),t("span",{staticClass:"hljs-string"},[a._v("'simple-mind-map/src/parse/markdown.js'")]),a._v("\n")])]),t("p",[a._v("If you are using the file in the format of "),t("code",[a._v("umd")]),a._v(", you can obtain it in the following way:")]),t("pre",{staticClass:"hljs"},[t("code",[t("span",{staticClass:"hljs-tag"},[a._v("<"),t("span",{staticClass:"hljs-name"},[a._v("script")]),a._v(" "),t("span",{staticClass:"hljs-attr"},[a._v("src")]),a._v("="),t("span",{staticClass:"hljs-string"},[a._v('"simple-mind-map/dist/simpleMindMap.umd.min.js"')]),a._v(">")]),t("span",{staticClass:"hljs-tag"},[a._v("</"),t("span",{staticClass:"hljs-name"},[a._v("script")]),a._v(">")]),a._v("\n")])]),t("pre",{staticClass:"hljs"},[t("code",[a._v("simpleMindMap.markdown\n")])]),t("h2",[a._v("Methods")]),t("h3",[a._v("transformToMarkdown(data)")]),t("ul",[t("li",[t("code",[a._v("data")]),a._v(": Mind map data can be obtained using the "),t("code",[a._v("mindMap.getData()")]),a._v(" method.")])]),t("p",[a._v("Convert mind map data into "),t("code",[a._v("Markdown")]),a._v(" format data, and the returned data is a string.")]),t("h3",[a._v("transformMarkdownTo(mdContent)")]),t("ul",[t("li",[t("code",[a._v("mdContent")]),a._v(": The "),t("code",[a._v("Markdown")]),a._v(" data to convert, string type.")])]),t("p",[a._v("Convert the "),t("code",[a._v("Markdown")]),a._v(" string into node tree data and return a "),t("code",[a._v("Promise")]),a._v(" instance. You can use the "),t("code",[a._v("mindMap.setData()")]),a._v(" method to render the converted data onto the canvas.")])])}],o={},d=o,i=s("2877"),r=Object(i["a"])(d,n,e,!1,null,null,null);t["default"]=r.exports}}]);
|
@ -1 +0,0 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0de01b"],{"848a":function(s,a,t){"use strict";t.r(a);var n=function(){var s=this;s._self._c;return s._m(0)},v=[function(){var s=this,a=s._self._c;return a("div",[a("h1",[s._v("Watermark插件")]),a("blockquote",[a("p",[s._v("0.2.24+")])]),a("p",[a("code",[s._v("Watermark")]),s._v("插件负责显示水印。")]),a("p",[s._v("配置请参考"),a("code",[s._v("MindMap")]),s._v("类的"),a("a",{attrs:{href:"/mind-map/#/doc/zh/constructor"}},[s._v("实例化选项")]),s._v("。")]),a("h2",[s._v("注册")]),a("pre",{staticClass:"hljs"},[a("code",[a("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" MindMap "),a("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),a("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map'")]),s._v("\n"),a("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" Watermark "),a("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),a("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map/src/plugins/Watermark.js'")]),s._v("\n"),a("span",{staticClass:"hljs-comment"},[s._v("// import Watermark from 'simple-mind-map/src/Watermark.js' v0.6.0以下版本使用该路径")]),s._v("\n\nMindMap.usePlugin(Watermark)\n")])]),a("p",[s._v("注册完且实例化"),a("code",[s._v("MindMap")]),s._v("后可通过"),a("code",[s._v("mindMap.watermark")]),s._v("获取到该实例。")]),a("h2",[s._v("方法")]),a("h3",[s._v("draw()")]),a("p",[s._v("重新绘制水印。")]),a("p",[s._v("注意:非精确绘制,会绘制一些超出可视区域的水印,如果对性能有极致要求,推荐自行开发水印功能。")]),a("h3",[s._v("updateWatermark(config)")]),a("p",[s._v("更新水印配置。示例:")]),a("pre",{staticClass:"hljs"},[a("code",[s._v("mindMap.watermark.updateWatermark({\n "),a("span",{staticClass:"hljs-attr"},[s._v("text")]),s._v(": "),a("span",{staticClass:"hljs-string"},[s._v("'水印文字'")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("lineSpacing")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("100")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("textSpacing")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("100")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("angle")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("50")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("textStyle")]),s._v(": {\n "),a("span",{staticClass:"hljs-attr"},[s._v("color")]),s._v(": "),a("span",{staticClass:"hljs-string"},[s._v("'#000'")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("opacity")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("1")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("fontSize")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("20")]),s._v("\n }\n})\n")])]),a("h3",[s._v("hasWatermark()")]),a("blockquote",[a("p",[s._v("v0.3.2+")])]),a("p",[s._v("获取是否存在水印。")])])}],_={},r=_,l=t("2877"),i=Object(l["a"])(r,n,v,!1,null,null,null);a["default"]=i.exports}}]);
|
@ -1 +0,0 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0e5089"],{9381:function(e,a,n){"use strict";n.r(a);var o=function(){var e=this;e._self._c;return e._m(0)},d=[function(){var e=this,a=e._self._c;return a("div",[a("h1",[e._v("command instance")]),a("p",[e._v("The "),a("code",[e._v("command")]),e._v(" instance is responsible for adding and executing commands. It includes many built-in commands and can also be added manually. A command refers to an operation that needs to add a copy to the history stack data. The "),a("code",[e._v("mindMap.command")]),e._v(' instance can be obtained through this."')]),a("h2",[e._v("Methods")]),a("h3",[e._v("add(name, fn)")]),a("p",[e._v("Add a command.")]),a("p",[a("code",[e._v("name")]),e._v(": Command name")]),a("p",[a("code",[e._v("fn")]),e._v(": Method to be executed by the command")]),a("h3",[e._v("remove(name, fn)")]),a("p",[e._v("Remove a command.")]),a("p",[a("code",[e._v("name")]),e._v(": Name of the command to be removed")]),a("p",[a("code",[e._v("fn")]),e._v(": Method to be removed, if not provided all methods for the command will be removed")]),a("h3",[e._v("getCopyData()")]),a("p",[e._v("Get a copy of the rendering tree data")]),a("h3",[e._v("clearHistory()")]),a("p",[e._v("Clear the history stack data")])])}],t={},c=t,m=n("2877"),v=Object(m["a"])(c,o,d,!1,null,null,null);a["default"]=v.exports}}]);
|
@ -1 +0,0 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0e9726"],{"8e25":function(s,a,t){"use strict";t.r(a);var n=function(){var s=this;s._self._c;return s._m(0)},l=[function(){var s=this,a=s._self._c;return a("div",[a("h1",[s._v("显示水印")]),a("blockquote",[a("p",[s._v("要使用水印需要注册水印插件")])]),a("p",[a("code",[s._v("simple-mind-map")]),s._v("提供了水印的插件,使用非常简单,首先可以在实例化"),a("code",[s._v("simple-mind-map")]),s._v("时提供水印的选项配置来直接显示水印:")]),a("pre",{staticClass:"hljs"},[a("code",[a("span",{staticClass:"hljs-keyword"},[s._v("new")]),s._v(" MindMap({\n "),a("span",{staticClass:"hljs-comment"},[s._v("// ...")]),s._v("\n "),a("span",{staticClass:"hljs-attr"},[s._v("watermarkConfig")]),s._v(": {\n "),a("span",{staticClass:"hljs-attr"},[s._v("text")]),s._v(": "),a("span",{staticClass:"hljs-string"},[s._v("'水印文字'")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("lineSpacing")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("100")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("textSpacing")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("100")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("angle")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("30")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("textStyle")]),s._v(": {\n "),a("span",{staticClass:"hljs-attr"},[s._v("color")]),s._v(": "),a("span",{staticClass:"hljs-string"},[s._v("'#999'")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("opacity")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("0.5")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("fontSize")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("14")]),s._v("\n }\n }\n})\n")])]),a("p",[s._v("详细字段含义可以阅读【API】-【构造函数】-【实例化选项】小节。")]),a("p",[s._v("此外也可以动态更新水印,"),a("code",[s._v("watermarkConfig")]),s._v("的所有配置都可以修改,如果不想再显示水印将"),a("code",[s._v("text")]),s._v("传入空字符串即可。")]),a("pre",{staticClass:"hljs"},[a("code",[s._v("mindMap.watermark.updateWatermark({\n "),a("span",{staticClass:"hljs-attr"},[s._v("text")]),s._v(": "),a("span",{staticClass:"hljs-string"},[s._v("'街角小林'")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("lineSpacing")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("50")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("textSpacing")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("50")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("angle")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("45")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("textStyle")]),s._v(": {\n "),a("span",{staticClass:"hljs-attr"},[s._v("color")]),s._v(": "),a("span",{staticClass:"hljs-string"},[s._v("'#73D8FF'")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("opacity")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("1")]),s._v(",\n "),a("span",{staticClass:"hljs-attr"},[s._v("fontSize")]),s._v(": "),a("span",{staticClass:"hljs-number"},[s._v("12")]),s._v("\n }\n})\n")])]),a("h2",[s._v("完整示例")]),a("iframe",{staticStyle:{width:"100%",height:"455px",border:"none"},attrs:{src:"https://wanglin2.github.io/playground/#eNrFVdtqG0cYfpVhQ1m5SLty49BalUPapoFCXUpy0YuMKavdkTTJ7Mx2Z9ayagQlFHoMPUEMDZTmKrlIwBcmEIeQl7FkP0b+2ZlZrQ4XuYtg7Zn/9P3nOfQ+ybJgvyBex+vKOKeZQpKoIruKOU0zkSt0iHLSbyLBd0XBFUmaSA4jxsToJumjCernIkU+WPArjV3Kk90oMyzsSSAz0kqB2kqjDHuYI4Q5IwppmpbcQbxgzNDDEE1f/TP95f7s9Q+zk5fn//548eu983svpj8fXTx6gnksuFQoihXdJ1+JhEjQnnvUuL23gXlpZfbwZPbgeHZ8Mr1/7NSKLIkU+Qa+PI3yu6Da2EA7V9GhxrbeBCPHDpbEG6UYQoocqA7yLx4dXTz+e3r8x+y/I79pWIxyciuLYsoHHXSlbalaYZUa8QEjHbR1pS6lxppmgfQvFkzkgHbpw8vXP7pxwwHpn9Am1biDNmvEvuDqFv0ejGx+YKgTSIiaQFr0gVeFbKyGrgtBRq6ALlzCOigRcZESroIBUZ8zoo+fjr9IGr7V/AxQI4g99zesL5C5qBYI9jQBewuxabKOWpOxN/v/hSm1aZHS9Sow7MVDypKccC18e25jydxalGWks9Pfz08fL4MtAq4B3Zvz6nLvyAN3tDSnRzlVN4VQeja+FpIqKjho+oz0ld9EfgylgzLtWfGq2aGCfQrtWXPb9rkZodmDn6bPqj5f6fXNtmvrlYZfZNmuv7wivtL5C92/vb1dx15o/3bgRmjNEGytpKz8N9n42OwbhGBXnD/8a/rnU1MOs3fOTn87e/m8vhYEb/gckvqt2T2Qy4a+NpH++yWVaj5OEOV8PwX7ESuIHi0rZ+BhHOHrhmbrwr6FiyKwKqEgcEOom9B9FLNIyh3sWSeuk1Rgr2RbAZrMudUQgkg3BG5d0FlSQrBepEUME6tur1BKcHQtZjS+CyJLaw9E67u0Gxp5Z7wCcqduWIsDrlJXtpS4Zl8I7AWheRbsqgmITINYSuxVVQlqIbusjmiihmVDvVfKIZRVHZ4TQIScl4yyxPq7tJwaZ2quGPWkYIUyitDVMCfQUvamRDa/rMIPCR0MQXyr3c4OHPJ63PcdMqR0QAHXWc2iJCnnxBAq1wNbqbf0eNN5YJ2u7mAQuqysgdf0TAX0QxzckYLDu1+ax5YBFahmEHvwrJt1FYRwDHJ4N2hKdLFavVyMJMnBCPbs8K156rXuUKlMdsKQHXzH5VgGQspWzFs9Qu9A2EHE6LjgsQxikYbQokTJNb2hYWwwE2/yBqzl3vI="}})])}],v={},r=v,i=t("2877"),p=Object(i["a"])(r,n,l,!1,null,null,null);a["default"]=p.exports}}]);
|
@ -1 +0,0 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0e9742"],{"8e32":function(e,t,o){"use strict";o.r(t);var n=function(){var e=this;e._self._c;return e._m(0)},d=[function(){var e=this,t=e._self._c;return t("div",[t("h1",[e._v("Render instance")]),t("p",[e._v("The "),t("code",[e._v("render")]),e._v(" instance is responsible for the entire rendering process and can be accessed through "),t("code",[e._v("mindMap.renderer")]),e._v(".")]),t("h2",[e._v("Properties")]),t("h3",[e._v("activeNodeList")]),t("p",[e._v("Gets the current list of active nodes")]),t("h3",[e._v("root")]),t("p",[e._v("Gets the root node of the node tree")]),t("h2",[e._v("Methods")]),t("h3",[e._v("clearActive()")]),t("p",[e._v("Clears the currently active node")]),t("h3",[e._v("clearAllActive()")]),t("p",[e._v("Clears all currently active nodes and triggers the "),t("code",[e._v("node_active")]),e._v(" event")]),t("h3",[e._v("startTextEdit()")]),t("blockquote",[t("p",[e._v("v0.1.6+")])]),t("p",[e._v("If there is a text editing requirement, this method can be called to disable the enter key and delete key related shortcuts to prevent conflicts")]),t("h3",[e._v("endTextEdit()")]),t("blockquote",[t("p",[e._v("v0.1.6+")])]),t("p",[e._v("End text editing, restore enter key and delete key related shortcuts")]),t("h3",[e._v("addActiveNode(node)")]),t("p",[e._v("Add a node to the active list")]),t("h3",[e._v("removeActiveNode(node)")]),t("p",[e._v("Remove a node from the active list")]),t("h3",[e._v("findActiveNodeIndex(node)")]),t("p",[e._v("Search for the index of a node in the active list")]),t("h3",[e._v("getNodeIndex(node)")]),t("p",[e._v("Get the position index of a node among its siblings")]),t("h3",[e._v("removeOneNode(node)")]),t("p",[e._v("Delete a specific node")]),t("h3",[e._v("copyNode()")]),t("p",[e._v("Copy a node, the active node is the node to be operated on, if there are multiple active nodes, only the first node will be operated on")]),t("h3",[e._v("setNodeDataRender(node, data)")]),t("p",[e._v("Set node "),t("code",[e._v("data")]),e._v(", i.e. the data in the data field, and will determine whether the node needs to be re-rendered based on whether the node size has changed, "),t("code",[e._v("data")]),e._v(" is an object, e.g. "),t("code",[e._v("{text: 'I am new text'}")])]),t("h3",[e._v("moveNodeTo(node, toNode)")]),t("blockquote",[t("p",[e._v("v0.1.5+")])]),t("p",[e._v("Move a node as a child of another node")]),t("h3",[e._v("insertBefore(node, exist)")]),t("blockquote",[t("p",[e._v("v0.1.5+")])]),t("p",[e._v("Move a node in front of another node")]),t("h3",[e._v("insertAfter(node, exist)")]),t("blockquote",[t("p",[e._v("v0.1.5+")])]),t("p",[e._v("Move a node behind another node")]),t("h3",[e._v("moveNodeToCenter(node)")]),t("blockquote",[t("p",[e._v("v0.2.17+")])]),t("p",[e._v("Move a node to the center of the canvas.")]),t("p",[e._v("Currently, if there is zoom, returning to the center will reset the zoom.")])])}],v={},r=v,i=o("2877"),a=Object(i["a"])(r,n,d,!1,null,null,null);t["default"]=a.exports}}]);
|
@ -1 +0,0 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d207d47"],{a1cd:function(s,n,t){"use strict";t.r(n);var e=function(){var s=this;s._self._c;return s._m(0)},i=[function(){var s=this,n=s._self._c;return n("div",[n("h1",[s._v("TouchEvent plugin")]),n("blockquote",[n("p",[s._v("v0.6.0+")])]),n("p",[s._v("This plugin supports mobile touch events for users. The principle is to listen for 'touchstart', 'touchmove', and 'touchend' events on the mobile end, and then dispatch corresponding mouse events.")]),n("p",[s._v("Currently, it supports single finger touch to move the canvas, click to activate nodes, double finger zoom the canvas, single finger double-click to reset and edit nodes.")]),n("h2",[s._v("Register")]),n("pre",{staticClass:"hljs"},[n("code",[n("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" MindMap "),n("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),n("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map'")]),s._v("\n"),n("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" TouchEvent "),n("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),n("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map/src/plugins/TouchEvent.js'")]),s._v("\n\nMindMap.usePlugin(TouchEvent)\n")])]),n("p",[s._v("After registration and instantiation of "),n("code",[s._v("MindMap")]),s._v(", the instance can be obtained through "),n("code",[s._v("mindMap.touchEvent")]),s._v(".")])])}],o={},a=o,c=t("2877"),r=Object(c["a"])(a,e,i,!1,null,null,null);n["default"]=r.exports}}]);
|