You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1 lines
5.9 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-9d289278"],{"076b":function(e,n,t){e.exports=t.p+"img/alipay.jpg"},4968:function(e,n,t){e.exports=t.p+"img/wechat.jpg"},d025:function(e,n,t){e.exports=t.p+"img/手绘风格.png"},d763:function(e,n,t){"use strict";t.r(n);var a=function(){var e=this;e._self._c;return e._m(0)},s=[function(){var e=this,n=e._self._c;return n("div",[n("h1",[e._v("HandDrawnLikeStyle chargeable plugin")]),n("blockquote",[n("p",[e._v("Regarding fees")]),n("p",[e._v("Mind map is an open-source project under the MIT protocol. In theory, as long as the copyright statement of mind map is retained, there is no charge for commercial use, and this protocol will not be changed in the future. Moreover, neither the online version nor the client will consider charging. However, in order to ensure the sustainable development of the project, revenue will be obtained through various means, such as existing sponsorship methods. The second approach is to use paid plugins, with the basic principle that basic functions, core functions, and necessary functions are not charged, while optional additional functions may be charged.")]),n("p",[e._v("Finally, the fee is only applicable to developers. If it is only the online version or client version of the mind map, users do not need to pay, and all functions can be used for free.")])]),n("p",[e._v("HandDrawnLikeStyle is the first paid plugin that provides a hand drawn style, where the connections and shapes of nodes become hand drawn, just like the following:")]),n("img",{staticStyle:{width:"800px"},attrs:{src:t("d025")}}),n("p",[e._v("You can also try to turn on the hand drawn style in the online version through the settings of 【 Basic Style 】 - 【 Enable Hand drawn Style 】.")]),n("p",[e._v("The internal implementation is through the "),n("a",{attrs:{href:"https://github.com/rough-stuff/rough"}},[e._v("rough")]),e._v(" library, so if you have the energy, you can also implement this plugin based on this library yourself.")]),n("h2",[e._v("Charge")]),n("p",[e._v("At present, the charging method is relatively primitive. By scanning the code and transferring money, please note the plugin you want to purchase and your email address, and then the plugin file will be sent to your email. Purchase should be made after full use and consideration. If you are not familiar with front-end development and do not know how to use plugins, please consider purchasing carefully. There will be no refund unless there are special reasons. If you find bugs or have requirements, you can submit relevant issues.")]),n("p",[e._v("Price:")]),n("p",[e._v("1.¥ 19.9, Only includes the packaged files, which are in two formats: .cjs.min.js and .esm.min.js.")]),n("p",[e._v("2.¥ 29.9, including unpackaged source code and packaged files.")]),n("img",{staticStyle:{width:"300px"},attrs:{src:t("076b")}}),n("img",{staticStyle:{width:"300px"},attrs:{src:t("4968")}}),n("h2",[e._v("Register")]),n("p",[e._v("1.Referencing packaged files:")]),n("pre",{staticClass:"hljs"},[n("code",[n("span",{staticClass:"hljs-keyword"},[e._v("import")]),e._v(" MindMap "),n("span",{staticClass:"hljs-keyword"},[e._v("from")]),e._v(" "),n("span",{staticClass:"hljs-string"},[e._v("'simple-mind-map'")]),e._v("\n"),n("span",{staticClass:"hljs-keyword"},[e._v("import")]),e._v(" HandDrawnLikeStyle "),n("span",{staticClass:"hljs-keyword"},[e._v("from")]),e._v(" "),n("span",{staticClass:"hljs-string"},[e._v("'handDrawnLikeStyle.cjs.min.js'")]),e._v("\n"),n("span",{staticClass:"hljs-comment"},[e._v("// or import HandDrawnLikeStyle from 'handDrawnLikeStyle.esm.min.js'")]),e._v("\n\nMindMap.usePlugin(HandDrawnLikeStyle)\n")])]),n("p",[e._v("2.Referencing Unpackaged Source Code")]),n("p",[e._v("You can first enter the plugin directory to execute:")]),n("pre",{staticClass:"hljs"},[n("code",[e._v("npm link\n")])]),n("p",[e._v("Then enter your project root directory to execute:")]),n("pre",{staticClass:"hljs"},[n("code",[e._v("npm link simple-mind-map-plugin-handdrawnlikestyle\n")])]),n("p",[e._v("Then you can directly import it for use:")]),n("pre",{staticClass:"hljs"},[n("code",[n("span",{staticClass:"hljs-keyword"},[e._v("import")]),e._v(" MindMap "),n("span",{staticClass:"hljs-keyword"},[e._v("from")]),e._v(" "),n("span",{staticClass:"hljs-string"},[e._v("'simple-mind-map'")]),e._v("\n"),n("span",{staticClass:"hljs-keyword"},[e._v("import")]),e._v(" HandDrawnLikeStyle "),n("span",{staticClass:"hljs-keyword"},[e._v("from")]),e._v(" "),n("span",{staticClass:"hljs-string"},[e._v("'simple-mind-map-plugin-handdrawnlikestyle'")]),e._v("\n\nMindMap.usePlugin(HandDrawnLikeStyle)\n")])]),n("p",[e._v("After registration and instantiation of "),n("code",[e._v("MindMap")]),e._v(", the instance can be obtained through "),n("code",[e._v("mindMap.handDrawnLikeStyle")]),e._v(".")]),n("p",[e._v("After registering the plugin, there is no need to perform other methods and the hand drawn style can take effect.")]),n("p",[e._v("If you are using the mindMap.addPlugin method to dynamically register a component, you need to call the method of re rendering once:")]),n("pre",{staticClass:"hljs"},[n("code",[e._v("mindMap.addPlugin(HandDrawnLikeStyle)\nmindMap.reRender()\n")])]),n("h2",[e._v("Methods")]),n("p",[e._v("You may not be familiar with the following methods.")]),n("h3",[e._v("createPath(svgPathStr)")]),n("ul",[n("li",[n("code",[e._v("svgPathStr")]),e._v(":SVG Path string")])]),n("p",[e._v("Create a hand drawn style path node and return the path node of SVG.")]),n("h3",[e._v("createPolygon(points)")]),n("ul",[n("li",[n("code",[e._v("points")]),e._v(":Points array")])]),n("pre",{staticClass:"hljs"},[n("code",[e._v("points:[\n [x1, y1],\n ...\n]\n")])]),n("p",[e._v("Create a hand drawn polygon node and return the Path node of SVG.")]),n("h3",[e._v("transformPath(svgPathStr)")]),n("p",[e._v("Convert SVG Path strings to hand drawn SVG Path strings.")])])}],i={},r=i,o=t("2877"),l=Object(o["a"])(r,a,s,!1,null,null,null);n["default"]=l.exports}}]);