From 3763cd0efca1655a0aeeeb65dac3f5878719748b Mon Sep 17 00:00:00 2001
From: wanglin2 <1013335014@qq.com>
Date: Sat, 26 Aug 2023 21:54:00 +0800
Subject: [PATCH 01/38] =?UTF-8?q?Feat:=E4=BF=AE=E6=94=B9=E5=AF=BC=E5=87=BA?=
=?UTF-8?q?=E5=9B=BE=E7=89=87=E6=96=B9=E6=B3=95=E7=9A=84=E5=8F=82=E6=95=B0?=
=?UTF-8?q?,=E5=AF=BC=E5=87=BApdf=E6=97=B6=E5=A6=82=E6=9E=9C=E6=80=9D?=
=?UTF-8?q?=E7=BB=B4=E5=AF=BC=E5=9B=BE=E5=B0=BA=E5=AF=B8=E5=B0=8F=E4=BA=8E?=
=?UTF-8?q?a4=E7=BA=B8=E9=82=A3=E4=B9=88=E4=B8=8D=E6=97=8B=E8=BD=AC?=
=?UTF-8?q?=E6=96=B9=E5=90=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
simple-mind-map/src/constants/constant.js | 6 +++++
simple-mind-map/src/plugins/Export.js | 17 ++++++++-----
simple-mind-map/src/plugins/ExportPDF.js | 31 ++++++++++-------------
3 files changed, 30 insertions(+), 24 deletions(-)
diff --git a/simple-mind-map/src/constants/constant.js b/simple-mind-map/src/constants/constant.js
index f07b162f..13202200 100644
--- a/simple-mind-map/src/constants/constant.js
+++ b/simple-mind-map/src/constants/constant.js
@@ -342,4 +342,10 @@ export const ERROR_TYPES = {
LOAD_CLIPBOARD_IMAGE_ERROR: 'load_clipboard_image_error',
BEFORE_TEXT_EDIT_ERROR: 'before_text_edit_error',
EXPORT_ERROR: 'export_error'
+}
+
+// a4纸的宽高
+export const a4Size = {
+ width: 592.28,
+ height: 841.89
}
\ No newline at end of file
diff --git a/simple-mind-map/src/plugins/Export.js b/simple-mind-map/src/plugins/Export.js
index 08c8ec3c..bb8dd3a6 100644
--- a/simple-mind-map/src/plugins/Export.js
+++ b/simple-mind-map/src/plugins/Export.js
@@ -7,6 +7,7 @@ import {
import { SVG } from '@svgdotjs/svg.js'
import drawBackgroundImageToCanvas from '../utils/simulateCSSBackgroundInCanvas'
import { transformToMarkdown } from '../parse/toMarkdown'
+import { a4Size } from '../constants/constant'
// 导出插件
class Export {
@@ -57,7 +58,7 @@ class Export {
}
// svg转png
- svgToPng(svgSrc, transparent, rotateWhenWidthLongerThenHeight = false) {
+ svgToPng(svgSrc, transparent, checkRotate = () => { return false }) {
return new Promise((resolve, reject) => {
const img = new Image()
// 跨域图片需要添加这个属性,否则画布被污染了无法导出图片
@@ -66,8 +67,7 @@ class Export {
try {
let canvas = document.createElement('canvas')
// 如果宽比高长,那么旋转90度
- let needRotate =
- rotateWhenWidthLongerThenHeight && img.width / img.height > 1
+ let needRotate = checkRotate(img.width, img.height)
if (needRotate) {
canvas.width = img.height
canvas.height = img.width
@@ -179,7 +179,7 @@ class Export {
* 方法1.把svg的图片都转化成data:url格式,再转换
* 方法2.把svg的图片提取出来再挨个绘制到canvas里,最后一起转换
*/
- async png(name, transparent = false, rotateWhenWidthLongerThenHeight) {
+ async png(name, transparent = false, checkRotate) {
let { node, str } = await this.getSvgData()
str = removeHTMLEntities(str)
// 如果开启了富文本,则使用htmltocanvas转换为图片
@@ -195,7 +195,7 @@ class Export {
// let imgDataUrl = await this.svgToPng(
// res,
// transparent,
- // rotateWhenWidthLongerThenHeight
+ // checkRotate
// )
// return imgDataUrl
}
@@ -209,7 +209,7 @@ class Export {
let res = await this.svgToPng(
svgUrl,
transparent,
- rotateWhenWidthLongerThenHeight
+ checkRotate
)
return res
}
@@ -219,7 +219,10 @@ class Export {
if (!this.mindMap.doExportPDF) {
throw new Error('请注册ExportPDF插件')
}
- let img = await this.png('', false, true)
+ let img = await this.png('', false, (width, height) => {
+ if (width <= a4Size.width && height && a4Size.height) return false
+ return (width / height) > 1
+ })
this.mindMap.doExportPDF.pdf(name, img, useMultiPageExport)
}
diff --git a/simple-mind-map/src/plugins/ExportPDF.js b/simple-mind-map/src/plugins/ExportPDF.js
index 27a81374..83f7ee88 100644
--- a/simple-mind-map/src/plugins/ExportPDF.js
+++ b/simple-mind-map/src/plugins/ExportPDF.js
@@ -1,4 +1,5 @@
import JsPDF from 'jspdf'
+import { a4Size } from '../constants/constant'
// 导出PDF插件,需要通过Export插件使用
class ExportPDF {
@@ -19,29 +20,27 @@ class ExportPDF {
// 单页导出
onePageExport(name, img) {
let pdf = new JsPDF('', 'pt', 'a4')
- let a4Width = 595
- let a4Height = 841
- let a4Ratio = a4Width / a4Height
+ let a4Ratio = a4Size.width / a4Size.height
let image = new Image()
image.onload = () => {
let imageWidth = image.width
let imageHeight = image.height
let imageRatio = imageWidth / imageHeight
let w, h
- if (imageWidth <= a4Width && imageHeight <= a4Height) {
+ if (imageWidth <= a4Size.width && imageHeight <= a4Size.height) {
// 使用图片原始宽高
w = imageWidth
h = imageHeight
} else if (a4Ratio > imageRatio) {
// 以a4Height为高度,缩放图片宽度
- w = imageRatio * a4Height
- h = a4Height
+ w = imageRatio * a4Size.height
+ h = a4Size.height
} else {
// 以a4Width为宽度,缩放图片高度
- w = a4Width
- h = a4Width / imageRatio
+ w = a4Size.width
+ h = a4Size.width / imageRatio
}
- pdf.addImage(img, 'PNG', (a4Width - w) / 2, (a4Height - h) / 2, w, h)
+ pdf.addImage(img, 'PNG', (a4Size.width - w) / 2, (a4Size.height - h) / 2, w, h)
pdf.save(name)
}
image.src = img
@@ -50,20 +49,18 @@ class ExportPDF {
// 多页导出
multiPageExport(name, img) {
let image = new Image()
- const a4Width = 592.28
- const a4Height = 841.89
image.onload = () => {
let imageWidth = image.width
let imageHeight = image.height
// 一页pdf显示高度
- let pageHeight = (imageWidth / a4Width) * a4Height
+ let pageHeight = (imageWidth / a4Size.width) * a4Size.height
// 未生成pdf的高度
let leftHeight = imageHeight
// 偏移
let position = 0
// a4纸的尺寸[595.28,841.89],图片在pdf中图片的宽高
- let imgWidth = a4Width
- let imgHeight = (a4Width / imageWidth) * imageHeight
+ let imgWidth = a4Size.width
+ let imgHeight = (a4Size.width / imageWidth) * imageHeight
let pdf = new JsPDF('', 'pt', 'a4')
// 有两个高度需要区分,一个是图片的实际高度,和生成pdf的页面高度(841.89)
// 当内容未超过pdf一页显示的范围,无需分页
@@ -71,8 +68,8 @@ class ExportPDF {
pdf.addImage(
img,
'PNG',
- (a4Width - imgWidth) / 2,
- (a4Height - imgHeight) / 2,
+ (a4Size.width - imgWidth) / 2,
+ (a4Size.height - imgHeight) / 2,
imgWidth,
imgHeight
)
@@ -81,7 +78,7 @@ class ExportPDF {
while (leftHeight > 0) {
pdf.addImage(img, 'PNG', 0, position, imgWidth, imgHeight)
leftHeight -= pageHeight
- position -= a4Height
+ position -= a4Size.height
// 避免添加空白页
if (leftHeight > 0) {
pdf.addPage()
From 8c0c2c5bc47bc1efccb4de069d1d17effa976c30 Mon Sep 17 00:00:00 2001
From: wanglin2 <1013335014@qq.com>
Date: Sun, 27 Aug 2023 09:40:45 +0800
Subject: [PATCH 02/38] =?UTF-8?q?Feat:=E6=8F=90=E5=8D=87=E5=AF=BC=E5=87=BA?=
=?UTF-8?q?=E7=9A=84=E5=9B=BE=E7=89=87=E5=92=8Cpdf=E5=9C=A8=E9=AB=98?=
=?UTF-8?q?=E6=B8=85=E5=B1=8F=E7=9A=84=E6=B8=85=E6=99=B0=E5=BA=A6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/constants/defaultOptions.js | 4 +-
simple-mind-map/src/plugins/Export.js | 38 +++++++++----------
2 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/simple-mind-map/src/constants/defaultOptions.js b/simple-mind-map/src/constants/defaultOptions.js
index 0c8262e1..8aeb847b 100644
--- a/simple-mind-map/src/constants/defaultOptions.js
+++ b/simple-mind-map/src/constants/defaultOptions.js
@@ -166,5 +166,7 @@ export const defaultOpt = {
}
`,
// 开启鼠标双击复位思维导图位置及缩放
- enableDblclickReset: true
+ enableDblclickReset: true,
+ // 导出图片时canvas的缩放倍数,该配置会和window.devicePixelRatio值取最大值
+ minExportImgCanvasScale: 2
}
diff --git a/simple-mind-map/src/plugins/Export.js b/simple-mind-map/src/plugins/Export.js
index bb8dd3a6..aa447540 100644
--- a/simple-mind-map/src/plugins/Export.js
+++ b/simple-mind-map/src/plugins/Export.js
@@ -65,37 +65,35 @@ class Export {
img.setAttribute('crossOrigin', 'anonymous')
img.onload = async () => {
try {
- let canvas = document.createElement('canvas')
+ const canvas = document.createElement('canvas')
+ const dpr = Math.max(window.devicePixelRatio, this.mindMap.opt.minExportImgCanvasScale)
+ const imgWidth = img.width
+ const imgHeight = img.height
// 如果宽比高长,那么旋转90度
- let needRotate = checkRotate(img.width, img.height)
+ const needRotate = checkRotate(imgWidth, imgHeight)
if (needRotate) {
- canvas.width = img.height
- canvas.height = img.width
+ canvas.width = imgHeight * dpr
+ canvas.height = imgWidth * dpr
+ canvas.style.width = imgHeight + 'px'
+ canvas.style.height = imgWidth + 'px'
} else {
- canvas.width = img.width
- canvas.height = img.height
+ canvas.width = imgWidth * dpr
+ canvas.height = imgHeight * dpr
+ canvas.style.width = imgWidth + 'px'
+ canvas.style.height = imgHeight + 'px'
}
- let ctx = canvas.getContext('2d')
+ const ctx = canvas.getContext('2d')
+ ctx.scale(dpr, dpr)
if (needRotate) {
ctx.rotate(0.5 * Math.PI)
- ctx.translate(0, -img.height)
+ ctx.translate(0, -imgHeight)
}
// 绘制背景
if (!transparent) {
- await this.drawBackgroundToCanvas(ctx, img.width, img.height)
+ await this.drawBackgroundToCanvas(ctx, imgWidth, imgHeight)
}
// 图片绘制到canvas里
- ctx.drawImage(
- img,
- 0,
- 0,
- img.width,
- img.height,
- 0,
- 0,
- img.width,
- img.height
- )
+ ctx.drawImage(img, 0, 0, imgWidth, imgHeight)
resolve(canvas.toDataURL())
} catch (error) {
reject(error)
From b35dd282ecc5ea1045f7f39a50a1d5b5b660cfc5 Mon Sep 17 00:00:00 2001
From: wanglin2 <1013335014@qq.com>
Date: Sun, 27 Aug 2023 10:34:15 +0800
Subject: [PATCH 03/38] =?UTF-8?q?Feat=EF=BC=9A=E6=8F=92=E4=BB=B6=E6=96=B0?=
=?UTF-8?q?=E5=A2=9E=E9=94=80=E6=AF=81=E5=89=8D=E7=94=9F=E5=91=BD=E5=91=A8?=
=?UTF-8?q?=E6=9C=9F=E5=87=BD=E6=95=B0=EF=BC=8C=E8=A7=A3=E5=86=B3=E9=94=80?=
=?UTF-8?q?=E6=AF=81=E6=80=9D=E7=BB=B4=E5=AF=BC=E5=9B=BE=E6=97=B6=E6=8F=92?=
=?UTF-8?q?=E4=BB=B6=E7=9A=84=E4=B8=80=E4=BA=9B=E5=89=AF=E4=BD=9C=E7=94=A8?=
=?UTF-8?q?=E6=B2=A1=E6=9C=89=E6=B8=85=E9=99=A4=E7=9A=84=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
simple-mind-map/index.js | 4 ++++
simple-mind-map/src/plugins/NodeImgAdjust.js | 5 +++++
simple-mind-map/src/plugins/Painter.js | 5 +++++
simple-mind-map/src/plugins/RichText.js | 5 +++++
simple-mind-map/src/plugins/TouchEvent.js | 5 +++++
5 files changed, 24 insertions(+)
diff --git a/simple-mind-map/index.js b/simple-mind-map/index.js
index f95a51e4..8767e978 100644
--- a/simple-mind-map/index.js
+++ b/simple-mind-map/index.js
@@ -406,6 +406,9 @@ class MindMap {
destroy() {
// 移除插件
;[...MindMap.pluginList].forEach(plugin => {
+ if (this[plugin.instanceName].beforePluginDestroy) {
+ this[plugin.instanceName].beforePluginDestroy()
+ }
this[plugin.instanceName] = null
})
// 解绑事件
@@ -414,6 +417,7 @@ class MindMap {
this.svg.remove()
// 去除给容器元素设置的背景样式
Style.removeBackgroundStyle(this.el)
+ this.el.innerHTML = ''
this.el = null
}
}
diff --git a/simple-mind-map/src/plugins/NodeImgAdjust.js b/simple-mind-map/src/plugins/NodeImgAdjust.js
index 4999f4bc..cdde7045 100644
--- a/simple-mind-map/src/plugins/NodeImgAdjust.js
+++ b/simple-mind-map/src/plugins/NodeImgAdjust.js
@@ -263,6 +263,11 @@ class NodeImgAdjust {
beforePluginRemove() {
this.unBindEvent()
}
+
+ // 插件被卸载前做的事情
+ beforePluginDestroy() {
+ this.unBindEvent()
+ }
}
NodeImgAdjust.instanceName = 'nodeImgAdjust'
diff --git a/simple-mind-map/src/plugins/Painter.js b/simple-mind-map/src/plugins/Painter.js
index 50ee08e5..b9ef5cd3 100644
--- a/simple-mind-map/src/plugins/Painter.js
+++ b/simple-mind-map/src/plugins/Painter.js
@@ -69,6 +69,11 @@ class Painter {
beforePluginRemove() {
this.unBindEvent()
}
+
+ // 插件被卸载前做的事情
+ beforePluginDestroy() {
+ this.unBindEvent()
+ }
}
Painter.instanceName = 'painter'
diff --git a/simple-mind-map/src/plugins/RichText.js b/simple-mind-map/src/plugins/RichText.js
index 8b393d60..2bd229e2 100644
--- a/simple-mind-map/src/plugins/RichText.js
+++ b/simple-mind-map/src/plugins/RichText.js
@@ -631,6 +631,11 @@ class RichText {
this.transformAllNodesToNormalNode()
document.head.removeChild(this.styleEl)
}
+
+ // 插件被卸载前做的事情
+ beforePluginDestroy() {
+ document.head.removeChild(this.styleEl)
+ }
}
RichText.instanceName = 'richText'
diff --git a/simple-mind-map/src/plugins/TouchEvent.js b/simple-mind-map/src/plugins/TouchEvent.js
index e2a3a741..7bad4fc3 100644
--- a/simple-mind-map/src/plugins/TouchEvent.js
+++ b/simple-mind-map/src/plugins/TouchEvent.js
@@ -148,6 +148,11 @@ class TouchEvent {
beforePluginRemove() {
this.unBindEvent()
}
+
+ // 插件被卸载前做的事情
+ beforePluginDestroy() {
+ this.unBindEvent()
+ }
}
TouchEvent.instanceName = 'touchEvent'
From a24f7a73c897af5bf20b64513066b7757f1966f3 Mon Sep 17 00:00:00 2001
From: wanglin2 <1013335014@qq.com>
Date: Sun, 27 Aug 2023 22:10:49 +0800
Subject: [PATCH 04/38] =?UTF-8?q?Feat=EF=BC=9A=E8=8A=82=E7=82=B9=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0=E9=BC=A0=E6=A0=87=E6=BB=91=E8=BF=87=E6=95=88=E6=9E=9C?=
=?UTF-8?q?=E3=80=81=E8=8A=82=E7=82=B9=E6=BF=80=E6=B4=BB=E6=95=88=E6=9E=9C?=
=?UTF-8?q?=E9=87=8D=E6=9E=84=E3=80=81=E5=8E=BB=E9=99=A4=E6=BF=80=E6=B4=BB?=
=?UTF-8?q?=E6=A0=B7=E5=BC=8F=E6=94=B9=E5=8F=98=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
simple-mind-map/index.js | 21 ++++++++++-
simple-mind-map/src/constants/constant.js | 22 +++++++++++-
.../src/constants/defaultOptions.js | 4 ++-
simple-mind-map/src/core/render/Render.js | 4 +--
simple-mind-map/src/core/render/node/Node.js | 35 ++++++++++---------
simple-mind-map/src/core/render/node/Shape.js | 16 ++++++++-
simple-mind-map/src/core/render/node/Style.js | 31 ++++++++--------
7 files changed, 97 insertions(+), 36 deletions(-)
diff --git a/simple-mind-map/index.js b/simple-mind-map/index.js
index 8767e978..44ad317f 100644
--- a/simple-mind-map/index.js
+++ b/simple-mind-map/index.js
@@ -11,7 +11,8 @@ import {
layoutValueList,
CONSTANTS,
commonCaches,
- ERROR_TYPES
+ ERROR_TYPES,
+ cssContent
} from './src/constants/constant'
import { SVG } from '@svgdotjs/svg.js'
import { simpleDeepClone, getType } from './src/utils'
@@ -37,6 +38,10 @@ class MindMap {
this.height = this.elRect.height
if (this.width <= 0 || this.height <= 0) throw new Error('容器元素el的宽高不能为0')
+ // 添加css
+ this.cssEl = null
+ this.addCss()
+
// 画布
this.svg = SVG().addTo(this.el).size(this.width, this.height)
this.draw = this.svg.group()
@@ -101,6 +106,19 @@ class MindMap {
return opt
}
+ // 添加css到页面
+ addCss() {
+ this.cssEl = document.createElement('style')
+ this.cssEl.type = 'text/css'
+ this.cssEl.innerHTML = cssContent
+ document.head.appendChild(this.cssEl)
+ }
+
+ // 移除css
+ removeCss() {
+ document.head.removeChild(this.cssEl)
+ }
+
// 渲染,部分渲染
render(callback, source = '') {
this.batchExecution.push('render', () => {
@@ -419,6 +437,7 @@ class MindMap {
Style.removeBackgroundStyle(this.el)
this.el.innerHTML = ''
this.el = null
+ this.removeCss()
}
}
diff --git a/simple-mind-map/src/constants/constant.js b/simple-mind-map/src/constants/constant.js
index 13202200..3a90c01c 100644
--- a/simple-mind-map/src/constants/constant.js
+++ b/simple-mind-map/src/constants/constant.js
@@ -348,4 +348,24 @@ export const ERROR_TYPES = {
export const a4Size = {
width: 592.28,
height: 841.89
-}
\ No newline at end of file
+}
+
+// css
+export const cssContent = `
+ /* 鼠标hover和激活时渲染的矩形 */
+ .smm-hover-node{
+ display: none;
+ opacity: 0.6;
+ stroke-width: 1;
+ }
+
+ .smm-node:hover .smm-hover-node{
+ display: block;
+ }
+
+ .smm-node.active .smm-hover-node{
+ display: block;
+ opacity: 1;
+ stroke-width: 2;
+ }
+`
\ No newline at end of file
diff --git a/simple-mind-map/src/constants/defaultOptions.js b/simple-mind-map/src/constants/defaultOptions.js
index 8aeb847b..9cd26ce9 100644
--- a/simple-mind-map/src/constants/defaultOptions.js
+++ b/simple-mind-map/src/constants/defaultOptions.js
@@ -168,5 +168,7 @@ export const defaultOpt = {
// 开启鼠标双击复位思维导图位置及缩放
enableDblclickReset: true,
// 导出图片时canvas的缩放倍数,该配置会和window.devicePixelRatio值取最大值
- minExportImgCanvasScale: 2
+ minExportImgCanvasScale: 2,
+ // 节点鼠标hover和激活时显示的矩形边框颜色
+ hoverRectColor: 'rgb(94, 200, 248)'
}
diff --git a/simple-mind-map/src/core/render/Render.js b/simple-mind-map/src/core/render/Render.js
index 39506d75..b7bb3ba1 100644
--- a/simple-mind-map/src/core/render/Render.js
+++ b/simple-mind-map/src/core/render/Render.js
@@ -407,7 +407,7 @@ class Render {
// 激活节点需要显示展开收起按钮
node.showExpandBtn()
setTimeout(() => {
- node.updateNodeShape()
+ node.updateNodeActive()
}, 0)
}
},
@@ -1000,7 +1000,7 @@ class Render {
} else {
node.hideExpandBtn()
}
- node.updateNodeShape()
+ node.updateNodeActive()
}
// 设置节点是否展开
diff --git a/simple-mind-map/src/core/render/node/Node.js b/simple-mind-map/src/core/render/node/Node.js
index f763b650..11eed5f9 100644
--- a/simple-mind-map/src/core/render/node/Node.js
+++ b/simple-mind-map/src/core/render/node/Node.js
@@ -1,6 +1,6 @@
import Style from './Style'
import Shape from './Shape'
-import { G, ForeignObject, SVG } from '@svgdotjs/svg.js'
+import { G, ForeignObject, SVG, Rect } from '@svgdotjs/svg.js'
import nodeGeneralizationMethods from './nodeGeneralization'
import nodeExpandBtnMethods from './nodeExpandBtn'
import nodeCommandWrapsMethods from './nodeCommandWraps'
@@ -58,6 +58,7 @@ class Node {
// 节点内容的容器
this.group = null
this.shapeNode = null // 节点形状节点
+ this.hoverNode = null // 节点hover和激活的节点
// 节点内容对象
this._customNodeContent = null
this._imgData = null
@@ -277,8 +278,8 @@ class Node {
this.shapeNode = this.shapeInstance.createShape()
this.shapeNode.addClass('smm-node-shape')
this.shapeNode.translate(halfBorderWidth, halfBorderWidth)
+ this.style.shape(this.shapeNode)
this.group.add(this.shapeNode)
- this.updateNodeShape()
// 渲染一个隐藏的矩形区域,用来触发展开收起按钮的显示
this.renderExpandBtnPlaceholderRect()
// 概要节点添加一个带所属节点id的类名
@@ -365,6 +366,11 @@ class Node {
: 0)
)
this.group.add(textContentNested)
+ // 激活hover和激活边框
+ this.hoverNode = new Rect()
+ this.hoverNode.addClass('smm-hover-node')
+ this.style.hoverNode(this.hoverNode, width, height)
+ this.group.add(this.hoverNode)
}
// 给节点绑定事件
@@ -467,10 +473,11 @@ class Node {
}
// 更新节点
- update(isLayout = false) {
+ update() {
if (!this.group) {
return
}
+ this.updateNodeActive()
let { alwaysShowExpandBtn } = this.mindMap.opt
if (alwaysShowExpandBtn) {
// 需要移除展开收缩按钮
@@ -543,13 +550,11 @@ class Node {
return sizeChange
}
- // 更新节点形状样式
- updateNodeShape() {
- if (!this.shapeNode) return
- const shape = this.getShape()
- this.style[shape === CONSTANTS.SHAPE.RECTANGLE ? 'rect' : 'shape'](
- this.shapeNode
- )
+ // 更新节点激活状态
+ updateNodeActive() {
+ if (!this.group) return
+ const isActive = this.nodeData.data.isActive
+ this.group[isActive ? 'addClass' : 'removeClass']('active')
}
// 递归渲染
@@ -557,9 +562,7 @@ class Node {
// 节点
// 重新渲染连线
this.renderLine()
- let isLayout = false
if (!this.group) {
- isLayout = true
// 创建组
this.group = new G()
this.group.addClass('smm-node')
@@ -569,7 +572,7 @@ class Node {
this.bindGroupEvent()
this.draw.add(this.group)
this.layout()
- this.update(isLayout)
+ this.update()
} else {
this.draw.add(this.group)
if (this.needLayout) {
@@ -803,8 +806,8 @@ class Node {
}
// 获取某个样式
- getStyle(prop, root, isActive) {
- let v = this.style.merge(prop, root, isActive)
+ getStyle(prop, root) {
+ let v = this.style.merge(prop, root)
return v === undefined ? '' : v
}
@@ -833,7 +836,7 @@ class Node {
// 获取节点非节点状态的边框大小
getBorderWidth() {
- return this.style.merge('borderWidth', false, false) || 0
+ return this.style.merge('borderWidth', false) || 0
}
// 获取数据
diff --git a/simple-mind-map/src/core/render/node/Shape.js b/simple-mind-map/src/core/render/node/Shape.js
index edefc6b2..f6d0e0df 100644
--- a/simple-mind-map/src/core/render/node/Shape.js
+++ b/simple-mind-map/src/core/render/node/Shape.js
@@ -69,7 +69,8 @@ export default class Shape {
let node = null
// 矩形
if (shape === CONSTANTS.SHAPE.RECTANGLE) {
- node = new Rect().size(width, height)
+ // node = new Rect().size(width, height)
+ node = this.createRect()
} else if (shape === CONSTANTS.SHAPE.DIAMOND) {
// 菱形
node = this.createDiamond()
@@ -98,6 +99,19 @@ export default class Shape {
return node
}
+ // 创建矩形TODO
+ createRect() {
+ let { width, height } = this.node
+ let borderRadius = this.node.style.merge('borderRadius')
+ return new Path().plot(`
+ M${0},0
+ L${width},0
+ L${width},${height}
+ L${0},${height}
+ L${0},${0}
+ `)
+ }
+
// 创建菱形
createDiamond() {
let { width, height } = this.node
diff --git a/simple-mind-map/src/core/render/node/Style.js b/simple-mind-map/src/core/render/node/Style.js
index 9cd452d2..325b8989 100644
--- a/simple-mind-map/src/core/render/node/Style.js
+++ b/simple-mind-map/src/core/render/node/Style.js
@@ -42,7 +42,7 @@ class Style {
}
// 合并样式
- merge(prop, root, isActive) {
+ merge(prop, root) {
let themeConfig = this.ctx.mindMap.themeConfig
// 三级及以下节点
let defaultConfig = themeConfig.node
@@ -59,17 +59,6 @@ class Style {
// 二级节点
defaultConfig = themeConfig.second
}
- // 激活状态
- if (isActive !== undefined ? isActive : this.ctx.nodeData.data.isActive) {
- if (
- this.ctx.nodeData.data.activeStyle &&
- this.ctx.nodeData.data.activeStyle[prop] !== undefined
- ) {
- return this.ctx.nodeData.data.activeStyle[prop]
- } else if (defaultConfig.active && defaultConfig.active[prop]) {
- return defaultConfig.active[prop]
- }
- }
// 优先使用节点本身的样式
return this.getSelfStyle(prop) !== undefined
? this.getSelfStyle(prop)
@@ -77,8 +66,8 @@ class Style {
}
// 获取某个样式值
- getStyle(prop, root, isActive) {
- return this.merge(prop, root, isActive)
+ getStyle(prop, root) {
+ return this.merge(prop, root)
}
// 获取自身自定义样式
@@ -220,6 +209,20 @@ class Style {
})
return res
}
+
+ // hover和激活节点
+ hoverNode(node, width, height) {
+ const { hoverRectColor } = this.ctx.mindMap.opt
+ node
+ .size(width + 0, height + 0)
+ .x(-0)
+ .y(-0)
+ .radius(5)
+ .fill('none')
+ .stroke({
+ color: hoverRectColor
+ })
+ }
}
Style.cacheStyle = null
From 1b0646af6d7c0d5f9fa76a23f103b81798dfc0b1 Mon Sep 17 00:00:00 2001
From: wanglin2 <1013335014@qq.com>
Date: Sun, 27 Aug 2023 22:51:18 +0800
Subject: [PATCH 05/38] =?UTF-8?q?Feat:=E8=8A=82=E7=82=B9=E7=9F=A9=E5=BD=A2?=
=?UTF-8?q?=E5=BD=A2=E7=8A=B6=E6=94=B9=E4=B8=BA=E4=BD=BF=E7=94=A8path?=
=?UTF-8?q?=E6=B8=B2=E6=9F=93?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
simple-mind-map/src/core/render/node/Shape.js | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/simple-mind-map/src/core/render/node/Shape.js b/simple-mind-map/src/core/render/node/Shape.js
index f6d0e0df..a9ff7816 100644
--- a/simple-mind-map/src/core/render/node/Shape.js
+++ b/simple-mind-map/src/core/render/node/Shape.js
@@ -104,11 +104,18 @@ export default class Shape {
let { width, height } = this.node
let borderRadius = this.node.style.merge('borderRadius')
return new Path().plot(`
- M${0},0
- L${width},0
- L${width},${height}
- L${0},${height}
- L${0},${0}
+ M${borderRadius},0
+ L${width - borderRadius},0
+ C${width - borderRadius},0 ${width},${0} ${width},${borderRadius}
+ L${width},${height - borderRadius}
+ C${width},${height - borderRadius} ${width},${height} ${
+ width - borderRadius
+ },${height}
+ L${borderRadius},${height}
+ C${borderRadius},${height} ${0},${height} ${0},${height - borderRadius}
+ L${0},${borderRadius}
+ C${0},${borderRadius} ${0},${0} ${borderRadius},${0}
+ Z
`)
}
From e36e238c2f0e81f1c6b6d5a4d6e6c8c1c9550159 Mon Sep 17 00:00:00 2001
From: wanglin2 <1013335014@qq.com>
Date: Mon, 28 Aug 2023 08:49:45 +0800
Subject: [PATCH 06/38] =?UTF-8?q?Fix=EF=BC=9A=E4=BF=AE=E5=A4=8D=E5=A4=A7?=
=?UTF-8?q?=E8=BE=B9=E6=A1=86=E5=B0=BA=E5=AF=B8=E7=9A=84=E6=B8=B2=E6=9F=93?=
=?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=8C=E5=8C=85=E6=8B=AC=E9=87=8D=E5=8F=A0?=
=?UTF-8?q?=EF=BC=8C=E5=86=85=E5=AE=B9=E4=B8=8D=E5=B1=85=E4=B8=AD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
simple-mind-map/src/core/render/node/Shape.js | 37 +++++++++++--------
1 file changed, 22 insertions(+), 15 deletions(-)
diff --git a/simple-mind-map/src/core/render/node/Shape.js b/simple-mind-map/src/core/render/node/Shape.js
index a9ff7816..217a8ae6 100644
--- a/simple-mind-map/src/core/render/node/Shape.js
+++ b/simple-mind-map/src/core/render/node/Shape.js
@@ -62,14 +62,9 @@ export default class Shape {
// 创建形状节点
createShape() {
const shape = this.node.getShape()
- const borderWidth = this.node.getBorderWidth()
- let { width, height } = this.node
- width -= borderWidth
- height -= borderWidth
let node = null
// 矩形
if (shape === CONSTANTS.SHAPE.RECTANGLE) {
- // node = new Rect().size(width, height)
node = this.createRect()
} else if (shape === CONSTANTS.SHAPE.DIAMOND) {
// 菱形
@@ -99,9 +94,21 @@ export default class Shape {
return node
}
- // 创建矩形TODO
- createRect() {
+ // 获取节点减去边框宽度的尺寸
+ getNodeSize() {
+ const borderWidth = this.node.getBorderWidth()
let { width, height } = this.node
+ width -= borderWidth
+ height -= borderWidth
+ return {
+ width,
+ height
+ }
+ }
+
+ // 创建矩形
+ createRect() {
+ let { width, height } = this.getNodeSize()
let borderRadius = this.node.style.merge('borderRadius')
return new Path().plot(`
M${borderRadius},0
@@ -121,7 +128,7 @@ export default class Shape {
// 创建菱形
createDiamond() {
- let { width, height } = this.node
+ let { width, height } = this.getNodeSize()
let halfWidth = width / 2
let halfHeight = height / 2
let topX = halfWidth
@@ -144,7 +151,7 @@ export default class Shape {
createParallelogram() {
let { paddingX } = this.node.getPaddingVale()
paddingX = paddingX || this.node.shapePadding.paddingX
- let { width, height } = this.node
+ let { width, height } = this.getNodeSize()
return new Polygon().plot([
[paddingX, 0],
[width, 0],
@@ -155,7 +162,7 @@ export default class Shape {
// 创建圆角矩形
createRoundedRectangle() {
- let { width, height } = this.node
+ let { width, height } = this.getNodeSize()
let halfHeight = height / 2
return new Path().plot(`
M${halfHeight},0
@@ -169,7 +176,7 @@ export default class Shape {
// 创建八角矩形
createOctagonalRectangle() {
let w = 5
- let { width, height } = this.node
+ let { width, height } = this.getNodeSize()
return new Polygon().plot([
[0, w],
[w, 0],
@@ -186,7 +193,7 @@ export default class Shape {
createOuterTriangularRectangle() {
let { paddingX } = this.node.getPaddingVale()
paddingX = paddingX || this.node.shapePadding.paddingX
- let { width, height } = this.node
+ let { width, height } = this.getNodeSize()
return new Polygon().plot([
[paddingX, 0],
[width - paddingX, 0],
@@ -201,7 +208,7 @@ export default class Shape {
createInnerTriangularRectangle() {
let { paddingX } = this.node.getPaddingVale()
paddingX = paddingX || this.node.shapePadding.paddingX
- let { width, height } = this.node
+ let { width, height } = this.getNodeSize()
return new Polygon().plot([
[0, 0],
[width, 0],
@@ -214,7 +221,7 @@ export default class Shape {
// 创建椭圆
createEllipse() {
- let { width, height } = this.node
+ let { width, height } = this.getNodeSize()
let halfWidth = width / 2
let halfHeight = height / 2
return new Path().plot(`
@@ -227,7 +234,7 @@ export default class Shape {
// 创建圆
createCircle() {
- let { width, height } = this.node
+ let { width, height } = this.getNodeSize()
let halfWidth = width / 2
let halfHeight = height / 2
return new Path().plot(`
From d14d887c1a4f03b2f78f5248793d22e96e7531c1 Mon Sep 17 00:00:00 2001
From: wanglin2 <1013335014@qq.com>
Date: Mon, 28 Aug 2023 09:11:39 +0800
Subject: [PATCH 07/38] =?UTF-8?q?Feat=EF=BC=9A=E4=BC=98=E5=8C=96=E9=BC=A0?=
=?UTF-8?q?=E6=A0=87hover=E5=92=8C=E6=BF=80=E6=B4=BB=E8=8A=82=E7=82=B9?=
=?UTF-8?q?=E7=9F=A9=E5=BD=A2=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=92=8C=E5=86=85?=
=?UTF-8?q?=E5=AE=B9=E7=9A=84=E8=B7=9D=E7=A6=BB?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
simple-mind-map/src/constants/defaultOptions.js | 6 ++++--
simple-mind-map/src/core/render/node/Node.js | 13 ++++++++-----
simple-mind-map/src/core/render/node/Shape.js | 7 ++++---
simple-mind-map/src/core/render/node/Style.js | 5 +----
4 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/simple-mind-map/src/constants/defaultOptions.js b/simple-mind-map/src/constants/defaultOptions.js
index 9cd26ce9..111d8ac6 100644
--- a/simple-mind-map/src/constants/defaultOptions.js
+++ b/simple-mind-map/src/constants/defaultOptions.js
@@ -169,6 +169,8 @@ export const defaultOpt = {
enableDblclickReset: true,
// 导出图片时canvas的缩放倍数,该配置会和window.devicePixelRatio值取最大值
minExportImgCanvasScale: 2,
- // 节点鼠标hover和激活时显示的矩形边框颜色
- hoverRectColor: 'rgb(94, 200, 248)'
+ // 节点鼠标hover和激活时显示的矩形边框的颜色
+ hoverRectColor: 'rgb(94, 200, 248)',
+ // 节点鼠标hover和激活时显示的矩形边框距节点内容的距离
+ hoverRectPadding: 2
}
diff --git a/simple-mind-map/src/core/render/node/Node.js b/simple-mind-map/src/core/render/node/Node.js
index 11eed5f9..b19b7b51 100644
--- a/simple-mind-map/src/core/render/node/Node.js
+++ b/simple-mind-map/src/core/render/node/Node.js
@@ -260,9 +260,11 @@ class Node {
this.shapePadding.paddingY = shapePaddingY
// 边框宽度,因为边框是以中线向两端发散,所以边框会超出节点
const borderWidth = this.getBorderWidth()
+ const { hoverRectPadding } = this.mindMap.opt
return {
- width: _width + paddingX * 2 + shapePaddingX * 2 + borderWidth,
- height: _height + paddingY * 2 + margin + shapePaddingY * 2 + borderWidth
+ width: _width + paddingX * 2 + shapePaddingX * 2 + borderWidth + hoverRectPadding * 2,
+ height:
+ _height + paddingY * 2 + margin + shapePaddingY * 2 + borderWidth + hoverRectPadding * 2
}
}
@@ -270,14 +272,15 @@ class Node {
layout() {
// 清除之前的内容
this.group.clear()
+ const { hoverRectPadding } = this.mindMap.opt
let { width, height, textContentItemMargin } = this
let { paddingY } = this.getPaddingVale()
const halfBorderWidth = this.getBorderWidth() / 2
- paddingY += this.shapePadding.paddingY + halfBorderWidth
+ paddingY += this.shapePadding.paddingY + halfBorderWidth + hoverRectPadding
// 节点形状
this.shapeNode = this.shapeInstance.createShape()
this.shapeNode.addClass('smm-node-shape')
- this.shapeNode.translate(halfBorderWidth, halfBorderWidth)
+ this.shapeNode.translate(halfBorderWidth + hoverRectPadding, halfBorderWidth + hoverRectPadding)
this.style.shape(this.shapeNode)
this.group.add(this.shapeNode)
// 渲染一个隐藏的矩形区域,用来触发展开收起按钮的显示
@@ -367,7 +370,7 @@ class Node {
)
this.group.add(textContentNested)
// 激活hover和激活边框
- this.hoverNode = new Rect()
+ this.hoverNode = new Rect().size(width, height).x(0).y(0)
this.hoverNode.addClass('smm-hover-node')
this.style.hoverNode(this.hoverNode, width, height)
this.group.add(this.hoverNode)
diff --git a/simple-mind-map/src/core/render/node/Shape.js b/simple-mind-map/src/core/render/node/Shape.js
index 217a8ae6..ef85c3b0 100644
--- a/simple-mind-map/src/core/render/node/Shape.js
+++ b/simple-mind-map/src/core/render/node/Shape.js
@@ -94,12 +94,13 @@ export default class Shape {
return node
}
- // 获取节点减去边框宽度的尺寸
+ // 获取节点减去节点边框宽度、hover节点边框宽度后的尺寸
getNodeSize() {
const borderWidth = this.node.getBorderWidth()
let { width, height } = this.node
- width -= borderWidth
- height -= borderWidth
+ const { hoverRectPadding } = this.node.mindMap.opt
+ width -= borderWidth + hoverRectPadding * 2
+ height -= borderWidth + hoverRectPadding * 2
return {
width,
height
diff --git a/simple-mind-map/src/core/render/node/Style.js b/simple-mind-map/src/core/render/node/Style.js
index 325b8989..2f8ab7f0 100644
--- a/simple-mind-map/src/core/render/node/Style.js
+++ b/simple-mind-map/src/core/render/node/Style.js
@@ -211,12 +211,9 @@ class Style {
}
// hover和激活节点
- hoverNode(node, width, height) {
+ hoverNode(node) {
const { hoverRectColor } = this.ctx.mindMap.opt
node
- .size(width + 0, height + 0)
- .x(-0)
- .y(-0)
.radius(5)
.fill('none')
.stroke({
From 217d66f692ded65de289404bb4e68a293550ccb4 Mon Sep 17 00:00:00 2001
From: wanglin2 <1013335014@qq.com>
Date: Mon, 28 Aug 2023 09:21:18 +0800
Subject: [PATCH 08/38] =?UTF-8?q?Feat=EF=BC=9A=E5=88=A0=E9=99=A4=E4=B8=BB?=
=?UTF-8?q?=E9=A2=98=E6=96=87=E4=BB=B6=E4=B8=AD=E8=8A=82=E7=82=B9=E6=BF=80?=
=?UTF-8?q?=E6=B4=BB=E6=A0=B7=E5=BC=8F=E7=9A=84=E9=83=A8=E5=88=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
simple-mind-map/src/themes/autumn.js | 21 +++-----------
simple-mind-map/src/themes/avocado.js | 21 +++-----------
simple-mind-map/src/themes/blackGold.js | 21 +++-----------
simple-mind-map/src/themes/blackHumour.js | 22 +++------------
simple-mind-map/src/themes/blueSky.js | 20 +++----------
.../src/themes/brainImpairedPink.js | 20 +++----------
simple-mind-map/src/themes/classic.js | 24 +++-------------
simple-mind-map/src/themes/classic2.js | 20 +++----------
simple-mind-map/src/themes/classic3.js | 20 +++----------
simple-mind-map/src/themes/classic4.js | 20 +++----------
simple-mind-map/src/themes/classicBlue.js | 20 +++----------
simple-mind-map/src/themes/classicGreen.js | 20 +++----------
simple-mind-map/src/themes/coffee.js | 21 +++-----------
simple-mind-map/src/themes/courseGreen.js | 21 +++-----------
simple-mind-map/src/themes/dark.js | 20 +++----------
simple-mind-map/src/themes/dark2.js | 22 +++------------
simple-mind-map/src/themes/default.js | 28 +++----------------
simple-mind-map/src/themes/earthYellow.js | 20 +++----------
simple-mind-map/src/themes/freshGreen.js | 7 +----
simple-mind-map/src/themes/freshRed.js | 20 +++----------
simple-mind-map/src/themes/gold.js | 22 +++------------
simple-mind-map/src/themes/greenLeaf.js | 22 +++------------
simple-mind-map/src/themes/lateNightOffice.js | 22 +++------------
simple-mind-map/src/themes/minions.js | 20 +++----------
simple-mind-map/src/themes/mint.js | 21 +++-----------
simple-mind-map/src/themes/orangeJuice.js | 21 +++-----------
simple-mind-map/src/themes/pinkGrape.js | 23 +++------------
simple-mind-map/src/themes/redSpirit.js | 21 +++-----------
simple-mind-map/src/themes/romanticPurple.js | 20 +++----------
simple-mind-map/src/themes/simpleBlack.js | 20 +++----------
simple-mind-map/src/themes/skyGreen.js | 22 +++------------
simple-mind-map/src/themes/vitalityOrange.js | 22 +++------------
web/src/customThemes/darkNightLceBlade.js | 20 +++----------
web/src/customThemes/lemonBubbles.js | 20 +++----------
web/src/customThemes/morandi.js | 20 +++----------
web/src/customThemes/neonLamp.js | 20 +++----------
web/src/customThemes/oreo.js | 20 +++----------
web/src/customThemes/rose.js | 20 +++----------
web/src/customThemes/seaBlueLine.js | 20 +++----------
web/src/customThemes/shallowSea.js | 20 +++----------
40 files changed, 157 insertions(+), 667 deletions(-)
diff --git a/simple-mind-map/src/themes/autumn.js b/simple-mind-map/src/themes/autumn.js
index 66c301bb..b7d295b1 100644
--- a/simple-mind-map/src/themes/autumn.js
+++ b/simple-mind-map/src/themes/autumn.js
@@ -18,11 +18,7 @@ export default merge(defaultTheme, {
color: '#fff',
borderColor: '#e68112',
borderWidth: 0,
- fontSize: 24,
- active: {
- borderColor: '#b0bc47',
- borderWidth: 3
- }
+ fontSize: 24
},
// 二级节点样式
second: {
@@ -30,18 +26,12 @@ export default merge(defaultTheme, {
color: '#8c5416',
borderColor: '#b0bc47',
borderWidth: 2,
- fontSize: 18,
- active: {
- borderColor: '#e68112'
- }
+ fontSize: 18
},
// 三级及以下节点样式
node: {
fontSize: 14,
- color: '#8c5416',
- active: {
- borderColor: '#b0bc47'
- }
+ color: '#8c5416'
},
// 概要节点样式
generalization: {
@@ -49,9 +39,6 @@ export default merge(defaultTheme, {
fillColor: '#ffd683',
borderColor: '#b0bc47',
borderWidth: 2,
- color: '#8c5416',
- active: {
- borderColor: '#e68112'
- }
+ color: '#8c5416'
}
})
diff --git a/simple-mind-map/src/themes/avocado.js b/simple-mind-map/src/themes/avocado.js
index d0d4f2bf..d425388b 100644
--- a/simple-mind-map/src/themes/avocado.js
+++ b/simple-mind-map/src/themes/avocado.js
@@ -18,11 +18,7 @@ export default merge(defaultTheme, {
color: '#fff',
borderColor: '#94c143',
borderWidth: 0,
- fontSize: 24,
- active: {
- borderColor: '#749336',
- borderWidth: 3
- }
+ fontSize: 24
},
// 二级节点样式
second: {
@@ -30,18 +26,12 @@ export default merge(defaultTheme, {
color: '#749336',
borderColor: '#aec668',
borderWidth: 2,
- fontSize: 18,
- active: {
- borderColor: '#749336'
- }
+ fontSize: 18
},
// 三级及以下节点样式
node: {
fontSize: 14,
- color: '#749336',
- active: {
- borderColor: '#749336'
- }
+ color: '#749336'
},
// 概要节点样式
generalization: {
@@ -49,9 +39,6 @@ export default merge(defaultTheme, {
fillColor: '#cee498',
borderColor: '#aec668',
borderWidth: 2,
- color: '#749336',
- active: {
- borderColor: '#749336'
- }
+ color: '#749336'
}
})
diff --git a/simple-mind-map/src/themes/blackGold.js b/simple-mind-map/src/themes/blackGold.js
index d694fe15..c11cd4ee 100644
--- a/simple-mind-map/src/themes/blackGold.js
+++ b/simple-mind-map/src/themes/blackGold.js
@@ -18,11 +18,7 @@ export default merge(defaultTheme, {
color: 'rgb(111, 61, 6)',
borderColor: '',
borderWidth: 0,
- fontSize: 24,
- active: {
- borderColor: '#fff',
- borderWidth: 3
- }
+ fontSize: 24
},
// 二级节点样式
second: {
@@ -30,18 +26,12 @@ export default merge(defaultTheme, {
color: 'rgb(225, 201, 158)',
borderColor: 'rgb(245, 224, 191)',
borderWidth: 2,
- fontSize: 18,
- active: {
- borderColor: 'rgb(255, 208, 124)'
- }
+ fontSize: 18
},
// 三级及以下节点样式
node: {
fontSize: 14,
- color: 'rgb(231, 203, 155)',
- active: {
- borderColor: 'rgb(255, 208, 124)'
- }
+ color: 'rgb(231, 203, 155)'
},
// 概要节点样式
generalization: {
@@ -49,9 +39,6 @@ export default merge(defaultTheme, {
fillColor: 'rgb(56, 45, 34)',
borderColor: 'rgb(104, 84, 61)',
borderWidth: 2,
- color: 'rgb(242, 216, 176)',
- active: {
- borderColor: 'rgb(255, 208, 124)'
- }
+ color: 'rgb(242, 216, 176)'
}
})
diff --git a/simple-mind-map/src/themes/blackHumour.js b/simple-mind-map/src/themes/blackHumour.js
index e219ff98..62de9777 100644
--- a/simple-mind-map/src/themes/blackHumour.js
+++ b/simple-mind-map/src/themes/blackHumour.js
@@ -18,11 +18,7 @@ export default merge(defaultTheme, {
color: '#fff',
borderColor: '',
borderWidth: 0,
- fontSize: 24,
- active: {
- borderColor: 'rgb(254, 199, 13)',
- borderWidth: 3
- }
+ fontSize: 24
},
// 二级节点样式
second: {
@@ -30,19 +26,12 @@ export default merge(defaultTheme, {
color: 'rgb(0, 0, 0)',
borderColor: '',
borderWidth: 0,
- fontSize: 18,
- active: {
- borderColor: 'rgb(36, 179, 96)',
- borderWidth: 3
- }
+ fontSize: 18
},
// 三级及以下节点样式
node: {
fontSize: 14,
- color: 'rgb(204, 204, 204)',
- active: {
- borderColor: 'rgb(254, 199, 13)'
- }
+ color: 'rgb(204, 204, 204)'
},
// 概要节点样式
generalization: {
@@ -50,9 +39,6 @@ export default merge(defaultTheme, {
fillColor: 'rgb(27, 31, 34)',
borderColor: 'rgb(255, 119, 34)',
borderWidth: 2,
- color: 'rgb(204, 204, 204)',
- active: {
- borderColor: 'rgb(36, 179, 96)'
- }
+ color: 'rgb(204, 204, 204)'
}
})
diff --git a/simple-mind-map/src/themes/blueSky.js b/simple-mind-map/src/themes/blueSky.js
index 1f464a72..f5343553 100644
--- a/simple-mind-map/src/themes/blueSky.js
+++ b/simple-mind-map/src/themes/blueSky.js
@@ -13,10 +13,7 @@ export default merge(defaultTheme, {
generalizationLineColor: '#333',
// 根节点样式
root: {
- fillColor: 'rgb(115, 161, 191)',
- active: {
- borderColor: 'rgb(57, 80, 96)'
- }
+ fillColor: 'rgb(115, 161, 191)'
},
// 二级节点样式
second: {
@@ -24,26 +21,17 @@ export default merge(defaultTheme, {
color: '#333',
borderColor: 'rgb(115, 161, 191)',
borderWidth: 1,
- fontSize: 14,
- active: {
- borderColor: 'rgb(57, 80, 96)'
- }
+ fontSize: 14
},
// 三级及以下节点样式
node: {
fontSize: 12,
- color: '#333',
- active: {
- borderColor: 'rgb(57, 80, 96)'
- }
+ color: '#333'
},
// 概要节点样式
generalization: {
fillColor: '#fff',
borderColor: '#333',
- color: '#333',
- active: {
- borderColor: 'rgb(57, 80, 96)'
- }
+ color: '#333'
}
})
diff --git a/simple-mind-map/src/themes/brainImpairedPink.js b/simple-mind-map/src/themes/brainImpairedPink.js
index e301bdfc..01fd3283 100644
--- a/simple-mind-map/src/themes/brainImpairedPink.js
+++ b/simple-mind-map/src/themes/brainImpairedPink.js
@@ -13,10 +13,7 @@ export default merge(defaultTheme, {
generalizationLineColor: '#333',
// 根节点样式
root: {
- fillColor: 'rgb(191, 115, 148)',
- active: {
- borderColor: 'rgb(96, 57, 74)'
- }
+ fillColor: 'rgb(191, 115, 148)'
},
// 二级节点样式
second: {
@@ -24,26 +21,17 @@ export default merge(defaultTheme, {
color: '#333',
borderColor: 'rgb(191, 115, 148)',
borderWidth: 1,
- fontSize: 14,
- active: {
- borderColor: 'rgb(96, 57, 74)'
- }
+ fontSize: 14
},
// 三级及以下节点样式
node: {
fontSize: 12,
- color: '#333',
- active: {
- borderColor: 'rgb(96, 57, 74)'
- }
+ color: '#333'
},
// 概要节点样式
generalization: {
fillColor: '#fff',
borderColor: '#333',
- color: '#333',
- active: {
- borderColor: 'rgb(96, 57, 74)'
- }
+ color: '#333'
}
})
diff --git a/simple-mind-map/src/themes/classic.js b/simple-mind-map/src/themes/classic.js
index eeeff67e..e58a7d3d 100644
--- a/simple-mind-map/src/themes/classic.js
+++ b/simple-mind-map/src/themes/classic.js
@@ -23,11 +23,7 @@ export default merge(defaultTheme, {
fillColor: 'rgb(233, 223, 152)',
color: '#333',
fontSize: 24,
- borderRadius: 21,
- active: {
- fillColor: 'rgb(254, 219, 0)',
- borderColor: 'transparent'
- }
+ borderRadius: 21
},
// 二级节点样式
second: {
@@ -35,30 +31,18 @@ export default merge(defaultTheme, {
borderColor: 'transparent',
color: '#333',
fontSize: 16,
- borderRadius: 10,
- active: {
- fillColor: 'rgb(254, 219, 0)',
- borderColor: 'transparent'
- }
+ borderRadius: 10
},
// 三级及以下节点样式
node: {
fontSize: 12,
color: '#fff',
- fontWeight: 'bold',
- active: {
- fillColor: 'rgb(254, 219, 0)',
- borderColor: 'transparent'
- }
+ fontWeight: 'bold'
},
// 概要节点样式
generalization: {
fillColor: '#fff',
borderColor: 'transparent',
- color: '#333',
- active: {
- fillColor: 'rgb(254, 219, 0)',
- borderColor: 'transparent'
- }
+ color: '#333'
}
})
diff --git a/simple-mind-map/src/themes/classic2.js b/simple-mind-map/src/themes/classic2.js
index 2c40fc70..1fef1fe2 100644
--- a/simple-mind-map/src/themes/classic2.js
+++ b/simple-mind-map/src/themes/classic2.js
@@ -18,10 +18,7 @@ export default merge(defaultTheme, {
fillColor: 'rgb(18, 187, 55)',
color: '#fff',
fontSize: 24,
- borderRadius: 10,
- active: {
- borderColor: 'rgb(51, 51, 51)'
- }
+ borderRadius: 10
},
// 二级节点样式
second: {
@@ -29,27 +26,18 @@ export default merge(defaultTheme, {
borderColor: 'transparent',
color: '#1a1a1a',
fontSize: 18,
- borderRadius: 10,
- active: {
- borderColor: 'rgb(51, 51, 51)'
- }
+ borderRadius: 10
},
// 三级及以下节点样式
node: {
fontSize: 14,
- color: '#1a1a1a',
- active: {
- borderColor: 'rgb(51, 51, 51)'
- }
+ color: '#1a1a1a'
},
// 概要节点样式
generalization: {
fillColor: '#fff',
borderColor: 'rgb(51, 51, 51)',
borderWidth: 2,
- color: '#1a1a1a',
- active: {
- borderColor: 'rgb(18, 187, 55)'
- }
+ color: '#1a1a1a'
}
})
diff --git a/simple-mind-map/src/themes/classic3.js b/simple-mind-map/src/themes/classic3.js
index 27ce5c6b..21523e2c 100644
--- a/simple-mind-map/src/themes/classic3.js
+++ b/simple-mind-map/src/themes/classic3.js
@@ -20,10 +20,7 @@ export default merge(defaultTheme, {
fontSize: 24,
borderRadius: 10,
borderColor: 'rgb(249, 199, 84)',
- borderWidth: 1,
- active: {
- borderColor: 'rgb(94, 202, 110)'
- }
+ borderWidth: 1
},
// 二级节点样式
second: {
@@ -32,27 +29,18 @@ export default merge(defaultTheme, {
borderWidth: 1,
color: '#1a1a1a',
fontSize: 18,
- borderRadius: 10,
- active: {
- borderColor: 'rgb(94, 202, 110)'
- }
+ borderRadius: 10
},
// 三级及以下节点样式
node: {
fontSize: 14,
- color: '#1a1a1a',
- active: {
- borderColor: 'rgb(94, 202, 110)'
- }
+ color: '#1a1a1a'
},
// 概要节点样式
generalization: {
fillColor: '#fff',
borderColor: '#1a1a1a',
color: '#1a1a1a',
- borderWidth: 2,
- active: {
- borderColor: 'rgb(94, 202, 110)'
- }
+ borderWidth: 2
}
})
diff --git a/simple-mind-map/src/themes/classic4.js b/simple-mind-map/src/themes/classic4.js
index a4046e9e..70886afb 100644
--- a/simple-mind-map/src/themes/classic4.js
+++ b/simple-mind-map/src/themes/classic4.js
@@ -20,10 +20,7 @@ export default merge(defaultTheme, {
fontSize: 24,
borderRadius: 10,
borderColor: 'rgb(189, 197, 201)',
- borderWidth: 2,
- active: {
- borderColor: 'rgb(169, 218, 218)'
- }
+ borderWidth: 2
},
// 二级节点样式
second: {
@@ -32,10 +29,7 @@ export default merge(defaultTheme, {
borderWidth: 2,
color: '#fff',
fontSize: 18,
- borderRadius: 10,
- active: {
- borderColor: 'rgb(56, 123, 233)'
- }
+ borderRadius: 10
},
// 三级及以下节点样式
node: {
@@ -43,19 +37,13 @@ export default merge(defaultTheme, {
color: 'rgb(30, 53, 86)',
borderColor: 'rgb(30, 53, 86)',
borderWidth: 1,
- marginY: 20,
- active: {
- borderColor: 'rgb(169, 218, 218)'
- }
+ marginY: 20
},
// 概要节点样式
generalization: {
fillColor: 'rgb(56, 123, 233)',
borderColor: 'rgb(56, 123, 233)',
color: '#fff',
- borderWidth: 0,
- active: {
- borderColor: 'rgb(169, 218, 218)'
- }
+ borderWidth: 0
}
})
diff --git a/simple-mind-map/src/themes/classicBlue.js b/simple-mind-map/src/themes/classicBlue.js
index 59539342..8b7a60b3 100644
--- a/simple-mind-map/src/themes/classicBlue.js
+++ b/simple-mind-map/src/themes/classicBlue.js
@@ -16,10 +16,7 @@ export default merge(defaultTheme, {
// 根节点样式
root: {
fillColor: 'rgb(255, 255, 255)',
- color: '#222',
- active: {
- borderColor: 'rgb(94, 199, 248)'
- }
+ color: '#222'
},
// 二级节点样式
second: {
@@ -27,26 +24,17 @@ export default merge(defaultTheme, {
color: '#222',
borderColor: 'rgb(255, 255, 255)',
borderWidth: 1,
- fontSize: 14,
- active: {
- borderColor: 'rgb(94, 199, 248)'
- }
+ fontSize: 14
},
// 三级及以下节点样式
node: {
fontSize: 12,
- color: '#333',
- active: {
- borderColor: 'rgb(94, 199, 248)'
- }
+ color: '#333'
},
// 概要节点样式
generalization: {
fillColor: '#fff',
borderColor: 'rgb(51, 51, 51)',
- color: '#333',
- active: {
- borderColor: 'rgb(94, 199, 248)'
- }
+ color: '#333'
}
})
diff --git a/simple-mind-map/src/themes/classicGreen.js b/simple-mind-map/src/themes/classicGreen.js
index 87725dbf..65b6e81b 100644
--- a/simple-mind-map/src/themes/classicGreen.js
+++ b/simple-mind-map/src/themes/classicGreen.js
@@ -14,10 +14,7 @@ export default merge(defaultTheme, {
// 根节点样式
root: {
fillColor: 'rgb(253, 244, 217)',
- color: '#222',
- active: {
- borderColor: 'rgb(94, 199, 248)'
- }
+ color: '#222'
},
// 二级节点样式
second: {
@@ -25,27 +22,18 @@ export default merge(defaultTheme, {
color: '#222',
borderColor: 'rgb(242, 200, 104)',
borderWidth: 1,
- fontSize: 14,
- active: {
- borderColor: 'rgb(94, 199, 248)'
- }
+ fontSize: 14
},
// 三级及以下节点样式
node: {
fontSize: 12,
- color: '#333',
- active: {
- borderColor: 'rgb(94, 199, 248)'
- }
+ color: '#333'
},
// 概要节点样式
generalization: {
fillColor: 'rgb(123, 199, 120)',
borderColor: 'transparent',
borderWidth: 2,
- color: '#fff',
- active: {
- borderColor: 'rgb(94, 199, 248)'
- }
+ color: '#fff'
}
})
diff --git a/simple-mind-map/src/themes/coffee.js b/simple-mind-map/src/themes/coffee.js
index 792a3389..b3f73d3c 100644
--- a/simple-mind-map/src/themes/coffee.js
+++ b/simple-mind-map/src/themes/coffee.js
@@ -16,11 +16,7 @@ export default merge(defaultTheme, {
color: '#fff',
borderColor: '',
borderWidth: 0,
- fontSize: 24,
- active: {
- borderColor: 'rgb(173, 123, 91)',
- borderWidth: 3
- }
+ fontSize: 24
},
// 二级节点样式
second: {
@@ -28,18 +24,12 @@ export default merge(defaultTheme, {
color: 'rgb(125, 86, 42)',
borderColor: '',
borderWidth: 0,
- fontSize: 18,
- active: {
- borderColor: 'rgb(173, 123, 91)'
- }
+ fontSize: 18
},
// 三级及以下节点样式
node: {
fontSize: 14,
- color: 'rgb(96, 71, 47)',
- active: {
- borderColor: 'rgb(173, 123, 91)'
- }
+ color: 'rgb(96, 71, 47)'
},
// 概要节点样式
generalization: {
@@ -47,9 +37,6 @@ export default merge(defaultTheme, {
fillColor: 'rgb(255, 249, 239)',
borderColor: 'rgb(173, 123, 91)',
borderWidth: 2,
- color: 'rgb(122, 83, 44)',
- active: {
- borderColor: 'rgb(202, 117, 79)'
- }
+ color: 'rgb(122, 83, 44)'
}
})
diff --git a/simple-mind-map/src/themes/courseGreen.js b/simple-mind-map/src/themes/courseGreen.js
index 78e50978..2d19cd1a 100644
--- a/simple-mind-map/src/themes/courseGreen.js
+++ b/simple-mind-map/src/themes/courseGreen.js
@@ -16,11 +16,7 @@ export default merge(defaultTheme, {
color: '#fff',
borderColor: '',
borderWidth: 0,
- fontSize: 24,
- active: {
- borderColor: 'rgb(173, 91, 12)',
- borderWidth: 3
- }
+ fontSize: 24
},
// 二级节点样式
second: {
@@ -28,18 +24,12 @@ export default merge(defaultTheme, {
color: 'rgb(50, 113, 96)',
borderColor: 'rgb(113, 195, 169)',
borderWidth: 2,
- fontSize: 18,
- active: {
- borderColor: 'rgb(173, 91, 12)'
- }
+ fontSize: 18
},
// 三级及以下节点样式
node: {
fontSize: 14,
- color: 'rgb(10, 59, 43)',
- active: {
- borderColor: 'rgb(173, 91, 12)'
- }
+ color: 'rgb(10, 59, 43)'
},
// 概要节点样式
generalization: {
@@ -47,9 +37,6 @@ export default merge(defaultTheme, {
fillColor: 'rgb(246, 238, 211)',
borderColor: '',
borderWidth: 0,
- color: 'rgb(173, 91, 12)',
- active: {
- borderColor: 'rgb(113, 195, 169)'
- }
+ color: 'rgb(173, 91, 12)'
}
})
diff --git a/simple-mind-map/src/themes/dark.js b/simple-mind-map/src/themes/dark.js
index 08350045..833f93c2 100644
--- a/simple-mind-map/src/themes/dark.js
+++ b/simple-mind-map/src/themes/dark.js
@@ -18,10 +18,7 @@ export default merge(defaultTheme, {
fillColor: 'rgb(28, 178, 43)',
color: '#fff',
fontSize: 24,
- borderRadius: 10,
- active: {
- borderColor: 'rgb(17, 68, 23)'
- }
+ borderRadius: 10
},
// 二级节点样式
second: {
@@ -29,26 +26,17 @@ export default merge(defaultTheme, {
color: 'rgb(147,148,149)',
fontSize: 18,
borderRadius: 10,
- borderWidth: 0,
- active: {
- borderColor: 'rgb(17, 68, 23)'
- }
+ borderWidth: 0
},
// 三级及以下节点样式
node: {
fontSize: 14,
- color: 'rgb(147, 148, 149)',
- active: {
- borderColor: 'rgb(17, 68, 23)'
- }
+ color: 'rgb(147, 148, 149)'
},
// 概要节点样式
generalization: {
fillColor: '#fff',
borderColor: 'transparent',
- color: '#333',
- active: {
- borderColor: 'rgb(17, 68, 23)'
- }
+ color: '#333'
}
})
diff --git a/simple-mind-map/src/themes/dark2.js b/simple-mind-map/src/themes/dark2.js
index a81de694..4a4e1c31 100644
--- a/simple-mind-map/src/themes/dark2.js
+++ b/simple-mind-map/src/themes/dark2.js
@@ -17,11 +17,7 @@ export default merge(defaultTheme, {
fillColor: 'rgb(36, 179, 96)',
color: '#fff',
borderColor: '',
- borderWidth: 0,
- active: {
- borderColor: 'rgb(254, 199, 13)',
- borderWidth: 3
- }
+ borderWidth: 0
},
// 二级节点样式
second: {
@@ -29,28 +25,18 @@ export default merge(defaultTheme, {
color: 'rgb(0, 0, 0)',
borderColor: '',
borderWidth: 0,
- fontSize: 14,
- active: {
- borderColor: 'rgb(36, 179, 96)',
- borderWidth: 2
- }
+ fontSize: 14
},
// 三级及以下节点样式
node: {
fontSize: 12,
- color: 'rgb(204, 204, 204)',
- active: {
- borderColor: 'rgb(254, 199, 13)'
- }
+ color: 'rgb(204, 204, 204)'
},
// 概要节点样式
generalization: {
fillColor: 'transparent',
borderColor: 'rgb(255, 119, 34)',
borderWidth: 2,
- color: 'rgb(204, 204, 204)',
- active: {
- borderColor: 'rgb(254, 199, 13)'
- }
+ color: 'rgb(204, 204, 204)'
}
})
diff --git a/simple-mind-map/src/themes/default.js b/simple-mind-map/src/themes/default.js
index 6b94a3c8..addc497a 100644
--- a/simple-mind-map/src/themes/default.js
+++ b/simple-mind-map/src/themes/default.js
@@ -70,12 +70,7 @@ export default {
borderWidth: 0,
borderDasharray: 'none',
borderRadius: 5,
- textDecoration: 'none',
- active: {
- borderColor: 'rgb(57, 80, 96)',
- borderWidth: 3,
- borderDasharray: 'none'
- }
+ textDecoration: 'none'
},
// 二级节点样式
second: {
@@ -93,12 +88,7 @@ export default {
borderWidth: 1,
borderDasharray: 'none',
borderRadius: 5,
- textDecoration: 'none',
- active: {
- borderColor: 'rgb(57, 80, 96)',
- borderWidth: 3,
- borderDasharray: 'none'
- }
+ textDecoration: 'none'
},
// 三级及以下节点样式
node: {
@@ -116,12 +106,7 @@ export default {
borderWidth: 0,
borderRadius: 5,
borderDasharray: 'none',
- textDecoration: 'none',
- active: {
- borderColor: 'rgb(57, 80, 96)',
- borderWidth: 3,
- borderDasharray: 'none'
- }
+ textDecoration: 'none'
},
// 概要节点样式
generalization: {
@@ -139,12 +124,7 @@ export default {
borderWidth: 1,
borderDasharray: 'none',
borderRadius: 5,
- textDecoration: 'none',
- active: {
- borderColor: 'rgb(57, 80, 96)',
- borderWidth: 3,
- borderDasharray: 'none'
- }
+ textDecoration: 'none'
}
}
diff --git a/simple-mind-map/src/themes/earthYellow.js b/simple-mind-map/src/themes/earthYellow.js
index 9d375b4a..0196cf8b 100644
--- a/simple-mind-map/src/themes/earthYellow.js
+++ b/simple-mind-map/src/themes/earthYellow.js
@@ -13,10 +13,7 @@ export default merge(defaultTheme, {
generalizationLineColor: '#333',
// 根节点样式
root: {
- fillColor: 'rgb(191, 147, 115)',
- active: {
- borderColor: 'rgb(96, 73, 57)'
- }
+ fillColor: 'rgb(191, 147, 115)'
},
// 二级节点样式
second: {
@@ -24,26 +21,17 @@ export default merge(defaultTheme, {
color: '#333',
borderColor: 'rgb(191, 147, 115)',
borderWidth: 1,
- fontSize: 14,
- active: {
- borderColor: 'rgb(96, 73, 57)'
- }
+ fontSize: 14
},
// 三级及以下节点样式
node: {
fontSize: 12,
- color: '#333',
- active: {
- borderColor: 'rgb(96, 73, 57)'
- }
+ color: '#333'
},
// 概要节点样式
generalization: {
fillColor: '#fff',
borderColor: '#333',
- color: '#333',
- active: {
- borderColor: 'rgb(96, 73, 57)'
- }
+ color: '#333'
}
})
diff --git a/simple-mind-map/src/themes/freshGreen.js b/simple-mind-map/src/themes/freshGreen.js
index ab11006e..7c939639 100644
--- a/simple-mind-map/src/themes/freshGreen.js
+++ b/simple-mind-map/src/themes/freshGreen.js
@@ -26,11 +26,6 @@ export default merge(defaultTheme, {
generalization: {
fillColor: '#fff',
borderColor: '#333',
- color: '#333',
- active: {
- borderColor: 'rgb(57, 80, 96)',
- borderWidth: 3,
- borderDasharray: 'none'
- }
+ color: '#333'
}
})
diff --git a/simple-mind-map/src/themes/freshRed.js b/simple-mind-map/src/themes/freshRed.js
index 3032f4d0..583b7933 100644
--- a/simple-mind-map/src/themes/freshRed.js
+++ b/simple-mind-map/src/themes/freshRed.js
@@ -13,10 +13,7 @@ export default merge(defaultTheme, {
generalizationLineColor: '#333',
// 根节点样式
root: {
- fillColor: 'rgb(191, 115, 115)',
- active: {
- borderColor: 'rgb(96, 57, 57)'
- }
+ fillColor: 'rgb(191, 115, 115)'
},
// 二级节点样式
second: {
@@ -24,26 +21,17 @@ export default merge(defaultTheme, {
color: '#333',
borderColor: 'rgb(191, 115, 115)',
borderWidth: 1,
- fontSize: 14,
- active: {
- borderColor: 'rgb(96, 57, 57)'
- }
+ fontSize: 14
},
// 三级及以下节点样式
node: {
fontSize: 12,
- color: '#333',
- active: {
- borderColor: 'rgb(96, 57, 57)'
- }
+ color: '#333'
},
// 概要节点样式
generalization: {
fillColor: '#fff',
borderColor: '#333',
- color: '#333',
- active: {
- borderColor: 'rgb(96, 57, 57)'
- }
+ color: '#333'
}
})
diff --git a/simple-mind-map/src/themes/gold.js b/simple-mind-map/src/themes/gold.js
index 538c3c67..a524a691 100644
--- a/simple-mind-map/src/themes/gold.js
+++ b/simple-mind-map/src/themes/gold.js
@@ -17,11 +17,7 @@ export default merge(defaultTheme, {
fillColor: 'rgb(51, 56, 62)',
color: 'rgb(247, 208, 160)',
borderColor: '',
- borderWidth: 0,
- active: {
- borderColor: 'rgb(247, 208, 160)',
- borderWidth: 3
- }
+ borderWidth: 0
},
// 二级节点样式
second: {
@@ -29,27 +25,17 @@ export default merge(defaultTheme, {
color: 'rgb(81, 58, 42)',
borderColor: '',
borderWidth: 0,
- fontSize: 14,
- active: {
- borderColor: 'rgb(51, 56, 62)',
- borderWidth: 2
- }
+ fontSize: 14
},
// 三级及以下节点样式
node: {
fontSize: 12,
- color: '#222',
- active: {
- borderColor: 'rgb(0, 192, 184)'
- }
+ color: '#222'
},
// 概要节点样式
generalization: {
fillColor: 'rgb(127, 93, 64)',
borderColor: 'transparent',
- color: 'rgb(255, 214, 175)',
- active: {
- borderColor: 'rgb(51, 56, 62)'
- }
+ color: 'rgb(255, 214, 175)'
}
})
diff --git a/simple-mind-map/src/themes/greenLeaf.js b/simple-mind-map/src/themes/greenLeaf.js
index d0c4f642..9fd18a39 100644
--- a/simple-mind-map/src/themes/greenLeaf.js
+++ b/simple-mind-map/src/themes/greenLeaf.js
@@ -17,11 +17,7 @@ export default merge(defaultTheme, {
fillColor: 'rgb(25, 193, 73)',
color: '#fff',
borderColor: '',
- borderWidth: 0,
- active: {
- borderColor: '#222',
- borderWidth: 3
- }
+ borderWidth: 0
},
// 二级节点样式
second: {
@@ -29,28 +25,18 @@ export default merge(defaultTheme, {
color: 'rgb(69, 149, 96)',
borderColor: '',
borderWidth: 0,
- fontSize: 14,
- active: {
- borderColor: 'rgb(25, 193, 73)',
- borderWidth: 2
- }
+ fontSize: 14
},
// 三级及以下节点样式
node: {
fontSize: 12,
- color: '#222',
- active: {
- borderColor: 'rgb(25, 193, 73)'
- }
+ color: '#222'
},
// 概要节点样式
generalization: {
fillColor: '#fff',
borderColor: 'rgb(251, 158, 0)',
borderWidth: 2,
- color: 'rgb(51, 51, 51)',
- active: {
- borderColor: 'rgb(25, 193, 73)'
- }
+ color: 'rgb(51, 51, 51)'
}
})
diff --git a/simple-mind-map/src/themes/lateNightOffice.js b/simple-mind-map/src/themes/lateNightOffice.js
index 34cec1a3..a80f4b69 100644
--- a/simple-mind-map/src/themes/lateNightOffice.js
+++ b/simple-mind-map/src/themes/lateNightOffice.js
@@ -18,11 +18,7 @@ export default merge(defaultTheme, {
color: 'rgb(255, 255, 255)',
borderColor: '',
borderWidth: 0,
- fontSize: 24,
- active: {
- borderColor: 'rgb(255, 119, 34)',
- borderWidth: 3
- }
+ fontSize: 24
},
// 二级节点样式
second: {
@@ -30,19 +26,12 @@ export default merge(defaultTheme, {
color: 'rgb(209, 210, 210)',
borderColor: '',
borderWidth: 0,
- fontSize: 18,
- active: {
- borderColor: 'rgb(255, 119, 34)',
- borderWidth: 3
- }
+ fontSize: 18
},
// 三级及以下节点样式
node: {
fontSize: 14,
- color: 'rgb(204, 204, 204)',
- active: {
- borderColor: 'rgb(255, 119, 34)'
- }
+ color: 'rgb(204, 204, 204)'
},
// 概要节点样式
generalization: {
@@ -50,9 +39,6 @@ export default merge(defaultTheme, {
fillColor: 'rgb(255, 119, 34)',
borderColor: '',
borderWidth: 2,
- color: '#fff',
- active: {
- borderColor: 'rgb(23, 153, 243)'
- }
+ color: '#fff'
}
})
diff --git a/simple-mind-map/src/themes/minions.js b/simple-mind-map/src/themes/minions.js
index 09ba44fd..b7f0d2f3 100644
--- a/simple-mind-map/src/themes/minions.js
+++ b/simple-mind-map/src/themes/minions.js
@@ -16,10 +16,7 @@ export default merge(defaultTheme, {
root: {
fillColor: 'rgb(55, 165, 255)',
borderColor: 'rgb(51, 51, 51)',
- borderWidth: 3,
- active: {
- borderColor: 'rgb(255, 160, 36)'
- }
+ borderWidth: 3
},
// 二级节点样式
second: {
@@ -27,26 +24,17 @@ export default merge(defaultTheme, {
color: '#222',
borderColor: 'rgb(51, 51, 51)',
borderWidth: 3,
- fontSize: 14,
- active: {
- borderColor: 'rgb(55, 165, 255)'
- }
+ fontSize: 14
},
// 三级及以下节点样式
node: {
fontSize: 12,
- color: '#222',
- active: {
- borderColor: 'rgb(55, 165, 255)'
- }
+ color: '#222'
},
// 概要节点样式
generalization: {
borderColor: '#222',
borderWidth: 3,
- color: '#222',
- active: {
- borderColor: 'rgb(55, 165, 255)'
- }
+ color: '#222'
}
})
diff --git a/simple-mind-map/src/themes/mint.js b/simple-mind-map/src/themes/mint.js
index 19e22104..336a67c0 100644
--- a/simple-mind-map/src/themes/mint.js
+++ b/simple-mind-map/src/themes/mint.js
@@ -16,11 +16,7 @@ export default merge(defaultTheme, {
root: {
fillColor: 'rgb(0, 192, 184)',
borderColor: '',
- borderWidth: 0,
- active: {
- borderColor: 'rgb(255, 160, 36)',
- borderWidth: 3
- }
+ borderWidth: 0
},
// 二级节点样式
second: {
@@ -28,26 +24,17 @@ export default merge(defaultTheme, {
color: '#222',
borderColor: 'rgb(184, 235, 233)',
borderWidth: 2,
- fontSize: 14,
- active: {
- borderColor: 'rgb(0, 192, 184)'
- }
+ fontSize: 14
},
// 三级及以下节点样式
node: {
fontSize: 12,
- color: '#222',
- active: {
- borderColor: 'rgb(0, 192, 184)'
- }
+ color: '#222'
},
// 概要节点样式
generalization: {
fillColor: 'rgb(90, 206, 241)',
borderColor: 'transparent',
- color: '#fff',
- active: {
- borderColor: 'rgb(0, 192, 184)'
- }
+ color: '#fff'
}
})
diff --git a/simple-mind-map/src/themes/orangeJuice.js b/simple-mind-map/src/themes/orangeJuice.js
index 419684e3..0e2c47f6 100644
--- a/simple-mind-map/src/themes/orangeJuice.js
+++ b/simple-mind-map/src/themes/orangeJuice.js
@@ -18,11 +18,7 @@ export default merge(defaultTheme, {
color: '#110501',
borderColor: '#ff6811',
borderWidth: 0,
- fontSize: 24,
- active: {
- borderColor: '#a9a4a9',
- borderWidth: 3
- }
+ fontSize: 24
},
// 二级节点样式
second: {
@@ -30,18 +26,12 @@ export default merge(defaultTheme, {
color: '#a9a4a9',
borderColor: '#ff6811',
borderWidth: 2,
- fontSize: 18,
- active: {
- borderColor: '#110501'
- }
+ fontSize: 18
},
// 三级及以下节点样式
node: {
fontSize: 14,
- color: '#a9a4a9',
- active: {
- borderColor: '#ff6811'
- }
+ color: '#a9a4a9'
},
// 概要节点样式
generalization: {
@@ -49,9 +39,6 @@ export default merge(defaultTheme, {
fillColor: '',
borderColor: '#ff6811',
borderWidth: 2,
- color: '#a9a4a9',
- active: {
- borderColor: '#110501'
- }
+ color: '#a9a4a9'
}
})
diff --git a/simple-mind-map/src/themes/pinkGrape.js b/simple-mind-map/src/themes/pinkGrape.js
index ca9b1c11..c867c740 100644
--- a/simple-mind-map/src/themes/pinkGrape.js
+++ b/simple-mind-map/src/themes/pinkGrape.js
@@ -16,11 +16,7 @@ export default merge(defaultTheme, {
root: {
fillColor: 'rgb(139, 109, 225)',
borderColor: '',
- borderWidth: 0,
- active: {
- borderColor: 'rgb(243, 104, 138)',
- borderWidth: 2
- }
+ borderWidth: 0
},
// 二级节点样式
second: {
@@ -28,28 +24,17 @@ export default merge(defaultTheme, {
color: '#fff',
borderColor: '',
borderWidth: 0,
- fontSize: 14,
- active: {
- borderColor: 'rgb(139, 109, 225)',
- borderWidth: 2
- }
+ fontSize: 14
},
// 三级及以下节点样式
node: {
fontSize: 12,
- color: '#222',
- active: {
- borderColor: 'rgb(139, 109, 225)'
- }
+ color: '#222'
},
// 概要节点样式
generalization: {
fillColor: '#fff',
borderColor: 'transparent',
- color: '#222',
- active: {
- borderColor: 'rgb(139, 109, 225)',
- borderWidth: 2
- }
+ color: '#222'
}
})
diff --git a/simple-mind-map/src/themes/redSpirit.js b/simple-mind-map/src/themes/redSpirit.js
index 0ee103c3..89dbca7c 100644
--- a/simple-mind-map/src/themes/redSpirit.js
+++ b/simple-mind-map/src/themes/redSpirit.js
@@ -18,11 +18,7 @@ export default merge(defaultTheme, {
color: 'rgb(255, 233, 157)',
borderColor: '',
borderWidth: 0,
- fontSize: 24,
- active: {
- borderColor: 'rgb(255, 233, 157)',
- borderWidth: 3
- }
+ fontSize: 24
},
// 二级节点样式
second: {
@@ -30,18 +26,12 @@ export default merge(defaultTheme, {
color: 'rgb(211, 58, 21)',
borderColor: 'rgb(222, 101, 85)',
borderWidth: 2,
- fontSize: 18,
- active: {
- borderColor: 'rgb(255, 233, 157)'
- }
+ fontSize: 18
},
// 三级及以下节点样式
node: {
fontSize: 14,
- color: 'rgb(144, 71, 43)',
- active: {
- borderColor: 'rgb(255, 233, 157)'
- }
+ color: 'rgb(144, 71, 43)'
},
// 概要节点样式
generalization: {
@@ -49,9 +39,6 @@ export default merge(defaultTheme, {
fillColor: 'rgb(255, 247, 211)',
borderColor: 'rgb(255, 202, 162)',
borderWidth: 2,
- color: 'rgb(187, 101, 69)',
- active: {
- borderColor: 'rgb(222, 101, 85)'
- }
+ color: 'rgb(187, 101, 69)'
}
})
diff --git a/simple-mind-map/src/themes/romanticPurple.js b/simple-mind-map/src/themes/romanticPurple.js
index fc27a18e..77fac345 100644
--- a/simple-mind-map/src/themes/romanticPurple.js
+++ b/simple-mind-map/src/themes/romanticPurple.js
@@ -13,10 +13,7 @@ export default merge(defaultTheme, {
generalizationLineColor: '#333',
// 根节点样式
root: {
- fillColor: 'rgb(123, 115, 191)',
- active: {
- borderColor: 'rgb(61, 57, 96)'
- }
+ fillColor: 'rgb(123, 115, 191)'
},
// 二级节点样式
second: {
@@ -24,26 +21,17 @@ export default merge(defaultTheme, {
color: '#333',
borderColor: 'rgb(123, 115, 191)',
borderWidth: 1,
- fontSize: 14,
- active: {
- borderColor: 'rgb(61, 57, 96)'
- }
+ fontSize: 14
},
// 三级及以下节点样式
node: {
fontSize: 12,
- color: '#333',
- active: {
- borderColor: 'rgb(61, 57, 96)'
- }
+ color: '#333'
},
// 概要节点样式
generalization: {
fillColor: '#fff',
borderColor: '#333',
- color: '#333',
- active: {
- borderColor: 'rgb(61, 57, 96)'
- }
+ color: '#333'
}
})
diff --git a/simple-mind-map/src/themes/simpleBlack.js b/simple-mind-map/src/themes/simpleBlack.js
index 6a04c827..31360896 100644
--- a/simple-mind-map/src/themes/simpleBlack.js
+++ b/simple-mind-map/src/themes/simpleBlack.js
@@ -16,10 +16,7 @@ export default merge(defaultTheme, {
color: 'rgb(34, 34, 34)',
borderColor: 'rgb(34, 34, 34)',
borderWidth: 3,
- fontSize: 24,
- active: {
- borderColor: '#a13600'
- }
+ fontSize: 24
},
// 二级节点样式
second: {
@@ -27,18 +24,12 @@ export default merge(defaultTheme, {
color: 'rgb(34, 34, 34)',
borderColor: 'rgb(34, 34, 34)',
borderWidth: 3,
- fontSize: 18,
- active: {
- borderColor: '#a13600'
- }
+ fontSize: 18
},
// 三级及以下节点样式
node: {
fontSize: 14,
- color: 'rgb(34, 34, 34)',
- active: {
- borderColor: '#a13600'
- }
+ color: 'rgb(34, 34, 34)'
},
// 概要节点样式
generalization: {
@@ -46,9 +37,6 @@ export default merge(defaultTheme, {
fillColor: 'transparent',
borderColor: 'rgb(34, 34, 34)',
borderWidth: 2,
- color: 'rgb(34, 34, 34)',
- active: {
- borderColor: '#a13600'
- }
+ color: 'rgb(34, 34, 34)'
}
})
diff --git a/simple-mind-map/src/themes/skyGreen.js b/simple-mind-map/src/themes/skyGreen.js
index d0a92f29..1193c397 100644
--- a/simple-mind-map/src/themes/skyGreen.js
+++ b/simple-mind-map/src/themes/skyGreen.js
@@ -17,11 +17,7 @@ export default merge(defaultTheme, {
fillColor: '#fff',
borderColor: '',
borderWidth: 0,
- color: 'rgb(65, 89, 158)',
- active: {
- borderColor: 'rgb(251, 227, 188)',
- borderWidth: 3
- }
+ color: 'rgb(65, 89, 158)'
},
// 二级节点样式
second: {
@@ -29,27 +25,17 @@ export default merge(defaultTheme, {
color: 'rgb(65, 89, 158)',
borderColor: '',
borderWidth: 0,
- fontSize: 14,
- active: {
- borderColor: '#fff',
- borderWidth: 2
- }
+ fontSize: 14
},
// 三级及以下节点样式
node: {
fontSize: 12,
- color: 'rgb(65, 89, 158)',
- active: {
- borderColor: 'rgb(251, 227, 188)'
- }
+ color: 'rgb(65, 89, 158)'
},
// 概要节点样式
generalization: {
fillColor: '#fff',
borderColor: 'transparent',
- color: 'rgb(65, 89, 158)',
- active: {
- borderColor: 'rgb(251, 227, 188)'
- }
+ color: 'rgb(65, 89, 158)'
}
})
diff --git a/simple-mind-map/src/themes/vitalityOrange.js b/simple-mind-map/src/themes/vitalityOrange.js
index f3f95c0c..a35a32fe 100644
--- a/simple-mind-map/src/themes/vitalityOrange.js
+++ b/simple-mind-map/src/themes/vitalityOrange.js
@@ -17,11 +17,7 @@ export default merge(defaultTheme, {
fillColor: 'rgb(255, 112, 52)',
color: '#fff',
borderColor: '',
- borderWidth: 0,
- active: {
- borderColor: 'rgb(51, 51, 51)',
- borderWidth: 3
- }
+ borderWidth: 0
},
// 二级节点样式
second: {
@@ -29,27 +25,17 @@ export default merge(defaultTheme, {
color: 'rgb(51, 51, 51)',
borderColor: '',
borderWidth: 0,
- fontSize: 14,
- active: {
- borderColor: 'rgb(255, 112, 52)',
- borderWidth: 2
- }
+ fontSize: 14
},
// 三级及以下节点样式
node: {
fontSize: 12,
- color: '#222',
- active: {
- borderColor: 'rgb(255, 112, 52)'
- }
+ color: '#222'
},
// 概要节点样式
generalization: {
fillColor: 'rgb(255, 222, 69)',
borderColor: 'transparent',
- color: 'rgb(51, 51, 51)',
- active: {
- borderColor: 'rgb(255, 112, 52)'
- }
+ color: 'rgb(51, 51, 51)'
}
})
diff --git a/web/src/customThemes/darkNightLceBlade.js b/web/src/customThemes/darkNightLceBlade.js
index 5345d914..12c2d2d5 100644
--- a/web/src/customThemes/darkNightLceBlade.js
+++ b/web/src/customThemes/darkNightLceBlade.js
@@ -19,10 +19,7 @@ export default {
borderColor: '#fff',
borderWidth: 3,
fontSize: 24,
- shape: 'parallelogram',
- active: {
- borderColor: 'rgba(2, 167, 240, 0.5)',
- }
+ shape: 'parallelogram'
},
// 二级节点样式
second: {
@@ -31,18 +28,12 @@ export default {
borderColor: '#fff',
borderWidth: 3,
fontSize: 18,
- shape: 'diamond',
- active: {
- borderColor: 'rgba(2, 167, 240, 0.5)',
- }
+ shape: 'diamond'
},
// 三级及以下节点样式
node: {
fontSize: 14,
- color: '#fff',
- active: {
- borderColor: 'rgba(2, 167, 240, 0.5)'
- }
+ color: '#fff'
},
// 概要节点样式
generalization: {
@@ -50,10 +41,7 @@ export default {
fillColor: '#fff',
borderColor: 'rgb(0, 117, 255)',
borderWidth: 2,
- color: 'rgb(0, 21, 21)',
- active: {
- borderColor: 'rgb(0, 243, 255)'
- }
+ color: 'rgb(0, 21, 21)'
}
}
\ No newline at end of file
diff --git a/web/src/customThemes/lemonBubbles.js b/web/src/customThemes/lemonBubbles.js
index 15470539..4cfe0604 100644
--- a/web/src/customThemes/lemonBubbles.js
+++ b/web/src/customThemes/lemonBubbles.js
@@ -15,10 +15,7 @@ export default {
borderColor: 'rgb(26, 26, 26)',
borderWidth: 3,
fontSize: 24,
- shape: 'roundedRectangle',
- active: {
- borderColor: 'rgb(235, 255, 187)',
- }
+ shape: 'roundedRectangle'
},
// 二级节点样式
second: {
@@ -27,18 +24,12 @@ export default {
borderColor: 'rgb(51, 51, 51)',
borderWidth: 3,
fontSize: 18,
- shape: 'roundedRectangle',
- active: {
- borderColor: 'rgb(39, 222, 232)',
- }
+ shape: 'roundedRectangle'
},
// 三级及以下节点样式
node: {
fontSize: 14,
- color: 'rgb(0, 0, 0)',
- active: {
- borderColor: 'rgb(39, 222, 232)'
- }
+ color: 'rgb(0, 0, 0)'
},
// 概要节点样式
generalization: {
@@ -46,10 +37,7 @@ export default {
fillColor: '#fff',
borderColor: 'rgb(26, 26, 26)',
borderWidth: 2,
- color: 'rgb(26, 26, 26)',
- active: {
- borderColor: 'rgb(39, 222, 232)'
- }
+ color: 'rgb(26, 26, 26)'
}
}
\ No newline at end of file
diff --git a/web/src/customThemes/morandi.js b/web/src/customThemes/morandi.js
index dc106f68..d00fb172 100644
--- a/web/src/customThemes/morandi.js
+++ b/web/src/customThemes/morandi.js
@@ -19,10 +19,7 @@ export default {
borderColor: 'rgb(207, 121, 105)',
borderWidth: 3,
fontSize: 24,
- shape: 'roundedRectangle',
- active: {
- borderColor: 'rgb(172, 202, 199)',
- }
+ shape: 'roundedRectangle'
},
// 二级节点样式
second: {
@@ -31,18 +28,12 @@ export default {
borderColor: 'rgb(222, 186, 183)',
borderWidth: 3,
fontSize: 18,
- shape: 'roundedRectangle',
- active: {
- borderColor: 'rgb(172, 202, 199)',
- }
+ shape: 'roundedRectangle'
},
// 三级及以下节点样式
node: {
fontSize: 14,
- color: 'rgb(131, 90, 64)',
- active: {
- borderColor: 'rgb(172, 202, 199)'
- }
+ color: 'rgb(131, 90, 64)'
},
// 概要节点样式
generalization: {
@@ -50,10 +41,7 @@ export default {
fillColor: 'rgb(172, 202, 199)',
borderColor: 'rgb(172, 202, 199)',
borderWidth: 2,
- color: 'rgb(91, 102, 97)',
- active: {
- borderColor: 'rgb(207, 121, 105)'
- }
+ color: 'rgb(91, 102, 97)'
}
}
\ No newline at end of file
diff --git a/web/src/customThemes/neonLamp.js b/web/src/customThemes/neonLamp.js
index 104e04f0..6fe9e346 100644
--- a/web/src/customThemes/neonLamp.js
+++ b/web/src/customThemes/neonLamp.js
@@ -19,10 +19,7 @@ export default {
borderColor: 'rgb(255, 0, 214)',
borderWidth: 3,
fontSize: 24,
- shape: 'roundedRectangle',
- active: {
- borderColor: 'rgb(255, 181, 0)',
- }
+ shape: 'roundedRectangle'
},
// 二级节点样式
second: {
@@ -30,18 +27,12 @@ export default {
color: 'rgb(248, 177, 237)',
borderColor: '',
borderWidth: 3,
- fontSize: 18,
- active: {
- borderColor: 'rgb(255, 181, 0)',
- }
+ fontSize: 18
},
// 三级及以下节点样式
node: {
fontSize: 14,
- color: '#fff',
- active: {
- borderColor: 'rgb(255, 181, 0)'
- }
+ color: '#fff'
},
// 概要节点样式
generalization: {
@@ -49,10 +40,7 @@ export default {
fillColor: '#fff',
borderColor: 'rgb(255, 181, 0)',
borderWidth: 2,
- color: 'rgb(17, 17, 84)',
- active: {
- borderColor: 'rgb(255, 0, 214)'
- }
+ color: 'rgb(17, 17, 84)'
}
}
\ No newline at end of file
diff --git a/web/src/customThemes/oreo.js b/web/src/customThemes/oreo.js
index dfa58cff..f0ee01b4 100644
--- a/web/src/customThemes/oreo.js
+++ b/web/src/customThemes/oreo.js
@@ -13,10 +13,7 @@ export default {
color: '#fff',
borderColor: 'rgb(22, 22, 22)',
borderWidth: 3,
- fontSize: 24,
- active: {
- borderColor: '#a13600',
- }
+ fontSize: 24
},
// 二级节点样式
second: {
@@ -25,18 +22,12 @@ export default {
borderColor: '',
borderWidth: 3,
fontSize: 18,
- shape: 'roundedRectangle',
- active: {
- borderColor: 'rgb(22, 22, 22)',
- }
+ shape: 'roundedRectangle'
},
// 三级及以下节点样式
node: {
fontSize: 14,
- color: 'rgb(0, 0, 0)',
- active: {
- borderColor: 'rgb(22, 22, 22)'
- }
+ color: 'rgb(0, 0, 0)'
},
// 概要节点样式
generalization: {
@@ -44,9 +35,6 @@ export default {
fillColor: 'transparent',
borderColor: 'rgb(34, 34, 34)',
borderWidth: 2,
- color: 'rgb(34, 34, 34)',
- active: {
- borderColor: '#a13600'
- }
+ color: 'rgb(34, 34, 34)'
}
}
diff --git a/web/src/customThemes/rose.js b/web/src/customThemes/rose.js
index c81368b8..ea499054 100644
--- a/web/src/customThemes/rose.js
+++ b/web/src/customThemes/rose.js
@@ -15,10 +15,7 @@ export default {
borderColor: 'rgb(18, 187, 55)',
borderWidth: 3,
fontSize: 24,
- shape: 'roundedRectangle',
- active: {
- borderColor: 'rgb(136, 100, 0)',
- }
+ shape: 'roundedRectangle'
},
// 二级节点样式
second: {
@@ -27,18 +24,12 @@ export default {
borderColor: '',
borderWidth: 3,
fontSize: 18,
- shape: 'roundedRectangle',
- active: {
- borderColor: 'rgb(254, 92, 92)',
- }
+ shape: 'roundedRectangle'
},
// 三级及以下节点样式
node: {
fontSize: 14,
- color: 'rgb(26, 26, 26)',
- active: {
- borderColor: 'rgb(209, 237, 176)'
- }
+ color: 'rgb(26, 26, 26)'
},
// 概要节点样式
generalization: {
@@ -46,10 +37,7 @@ export default {
fillColor: '#fff',
borderColor: 'rgb(136, 100, 0)',
borderWidth: 2,
- color: 'rgb(136, 100, 0)',
- active: {
- borderColor: 'rgb(254, 92, 92)'
- }
+ color: 'rgb(136, 100, 0)'
}
}
\ No newline at end of file
diff --git a/web/src/customThemes/seaBlueLine.js b/web/src/customThemes/seaBlueLine.js
index ffaba245..e54ac1ee 100644
--- a/web/src/customThemes/seaBlueLine.js
+++ b/web/src/customThemes/seaBlueLine.js
@@ -15,10 +15,7 @@ export default {
borderColor: '#fff',
borderWidth: 3,
fontSize: 24,
- shape: 'roundedRectangle',
- active: {
- borderColor: 'rgb(0, 155, 255)',
- }
+ shape: 'roundedRectangle'
},
// 二级节点样式
second: {
@@ -27,18 +24,12 @@ export default {
borderColor: '',
borderWidth: 3,
fontSize: 18,
- shape: 'roundedRectangle',
- active: {
- borderColor: 'rgb(96, 189, 255)',
- }
+ shape: 'roundedRectangle'
},
// 三级及以下节点样式
node: {
fontSize: 14,
- color: 'rgb(0, 66, 157)',
- active: {
- borderColor: 'rgb(96, 189, 255)'
- }
+ color: 'rgb(0, 66, 157)'
},
// 概要节点样式
generalization: {
@@ -46,10 +37,7 @@ export default {
fillColor: '#fff',
borderColor: 'rgb(0, 155, 255)',
borderWidth: 2,
- color: 'rgb(0, 155, 255)',
- active: {
- borderColor: 'rgba(2, 167, 240, 0.5)'
- }
+ color: 'rgb(0, 155, 255)'
}
}
\ No newline at end of file
diff --git a/web/src/customThemes/shallowSea.js b/web/src/customThemes/shallowSea.js
index 92f6d160..0374bb3b 100644
--- a/web/src/customThemes/shallowSea.js
+++ b/web/src/customThemes/shallowSea.js
@@ -15,10 +15,7 @@ export default {
borderColor: 'rgb(51, 149, 255)',
borderWidth: 3,
fontSize: 24,
- shape: 'roundedRectangle',
- active: {
- borderColor: 'rgb(255, 168, 101)',
- }
+ shape: 'roundedRectangle'
},
// 二级节点样式
second: {
@@ -26,18 +23,12 @@ export default {
color: '#fff',
borderColor: '',
borderWidth: 3,
- fontSize: 18,
- active: {
- borderColor: 'rgb(255, 168, 101)',
- }
+ fontSize: 18
},
// 三级及以下节点样式
node: {
fontSize: 14,
- color: 'rgb(0, 0, 0)',
- active: {
- borderColor: 'rgb(255, 168, 101)'
- }
+ color: 'rgb(0, 0, 0)'
},
// 概要节点样式
generalization: {
@@ -45,10 +36,7 @@ export default {
fillColor: '#fff',
borderColor: 'rgb(255, 168, 101)',
borderWidth: 2,
- color: '#000',
- active: {
- borderColor: 'rgb(51, 149, 255)'
- }
+ color: '#000'
}
}
\ No newline at end of file
From 5997c98b8fdc07e92d7cfe174c53dcc401c58ad3 Mon Sep 17 00:00:00 2001
From: wanglin2 <1013335014@qq.com>
Date: Mon, 28 Aug 2023 09:33:29 +0800
Subject: [PATCH 09/38] =?UTF-8?q?Demo=EF=BC=9A=E5=88=A0=E9=99=A4=E4=BE=A7?=
=?UTF-8?q?=E8=BE=B9=E6=A0=8F=E8=8A=82=E7=82=B9=E6=A0=B7=E5=BC=8F=E9=85=8D?=
=?UTF-8?q?=E7=BD=AE=E9=83=A8=E5=88=86=E7=9A=84=E6=BF=80=E6=B4=BB=E8=8A=82?=
=?UTF-8?q?=E7=82=B9=E9=85=8D=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
web/src/pages/Edit/components/Style.vue | 131 +++++++-----------------
1 file changed, 35 insertions(+), 96 deletions(-)
diff --git a/web/src/pages/Edit/components/Style.vue b/web/src/pages/Edit/components/Style.vue
index 6bce2364..e20b2f7f 100644
--- a/web/src/pages/Edit/components/Style.vue
+++ b/web/src/pages/Edit/components/Style.vue
@@ -5,10 +5,6 @@
:class="{ isDark: isDark }"
v-if="activeNodes.length > 0"
>
-
-
-
-
+
+
+
布林
+
diff --git a/web/src/pages/Doc/zh/introduction/index.md b/web/src/pages/Doc/zh/introduction/index.md
index b2394e7f..17bf4a93 100644
--- a/web/src/pages/Doc/zh/introduction/index.md
+++ b/web/src/pages/Doc/zh/introduction/index.md
@@ -177,4 +177,8 @@
Luke
+
+
+
布林
+
\ No newline at end of file
diff --git a/web/src/pages/Doc/zh/introduction/index.vue b/web/src/pages/Doc/zh/introduction/index.vue
index ecadc35f..24a656ec 100644
--- a/web/src/pages/Doc/zh/introduction/index.vue
+++ b/web/src/pages/Doc/zh/introduction/index.vue
@@ -8,16 +8,16 @@
特性
仓库目录介绍
1.simple-mind-map
@@ -25,11 +25,11 @@
2.web
使用simple-mind-map库,基于vue2.x、ElementUI搭建的在线思维导图。特性:
提供文档页面服务。
3.dist
@@ -137,6 +137,10 @@
Luke
+
+
+
布林
+
From 32c17921caf3d2b8903ae69549582513ec60548e Mon Sep 17 00:00:00 2001
From: wanglin2 <1013335014@qq.com>
Date: Sat, 2 Sep 2023 08:31:08 +0800
Subject: [PATCH 34/38] =?UTF-8?q?Demo:=E6=94=AF=E6=8C=81=E9=85=8D=E7=BD=AE?=
=?UTF-8?q?=E6=98=AF=E5=90=A6=E6=98=BE=E7=A4=BA=E6=BB=9A=E5=8A=A8=E6=9D=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
web/src/lang/en_us.js | 3 +-
web/src/lang/zh_cn.js | 3 +-
web/src/pages/Edit/components/BaseStyle.vue | 44 +++++++++++++++------
web/src/pages/Edit/components/Edit.vue | 5 ++-
web/src/store.js | 4 +-
5 files changed, 41 insertions(+), 18 deletions(-)
diff --git a/web/src/lang/en_us.js b/web/src/lang/en_us.js
index 5302cea9..f7548a76 100644
--- a/web/src/lang/en_us.js
+++ b/web/src/lang/en_us.js
@@ -50,7 +50,8 @@ export default {
rootStyle: 'Root Node',
associativeLineText: 'Associative line text',
fontFamily: 'Font family',
- fontSize: 'Font size'
+ fontSize: 'Font size',
+ isShowScrollbar: 'Is show scrollbar'
},
color: {
moreColor: 'More color'
diff --git a/web/src/lang/zh_cn.js b/web/src/lang/zh_cn.js
index dca9eb6e..2d2edf05 100644
--- a/web/src/lang/zh_cn.js
+++ b/web/src/lang/zh_cn.js
@@ -50,7 +50,8 @@ export default {
rootStyle: '根节点',
associativeLineText: '关联线文字',
fontFamily: '字体',
- fontSize: '字号'
+ fontSize: '字号',
+ isShowScrollbar: '是否显示滚动条'
},
color: {
moreColor: '更多颜色'
diff --git a/web/src/pages/Edit/components/BaseStyle.vue b/web/src/pages/Edit/components/BaseStyle.vue
index d9705bf6..da5f0cde 100644
--- a/web/src/pages/Edit/components/BaseStyle.vue
+++ b/web/src/pages/Edit/components/BaseStyle.vue
@@ -753,6 +753,16 @@
+
+
+
+ {{ $t('baseStyle.isShowScrollbar') }}
+
+
@@ -848,7 +858,10 @@ export default {
}
},
updateWatermarkTimer: null,
- enableNodeRichText: true
+ enableNodeRichText: true,
+ localConfigs: {
+ isShowScrollbar: false
+ }
}
},
computed: {
@@ -894,9 +907,7 @@ export default {
}
},
created() {
- this.enableNodeRichText = this.localConfig.openNodeRichText
- this.mousewheelAction = this.localConfig.mousewheelAction
- this.mousewheelZoomActionReverse = this.localConfig.mousewheelZoomActionReverse
+ this.initLoacalConfig()
this.$bus.$on('setData', this.onSetData)
},
beforeDestroy() {
@@ -963,6 +974,18 @@ export default {
})
},
+ // 初始化本地配置
+ initLoacalConfig() {
+ this.enableNodeRichText = this.localConfig.openNodeRichText
+ this.mousewheelAction = this.localConfig.mousewheelAction
+ this.mousewheelZoomActionReverse = this.localConfig.mousewheelZoomActionReverse
+ ;[
+ 'isShowScrollbar'
+ ].forEach(key => {
+ this.localConfigs[key] = this.localConfig[key]
+ })
+ },
+
// 初始化水印配置
initWatermark() {
let config = this.mindMap.getConfig('watermarkConfig')
@@ -1038,11 +1061,7 @@ export default {
}, 300)
},
- /**
- * @Author: 王林
- * @Date: 2021-07-03 22:08:12
- * @Desc: 设置margin
- */
+ // 设置margin
updateMargin(type, value) {
this.style[type] = value
if (!this.data.theme.config[this.marginActiveTab]) {
@@ -1078,12 +1097,11 @@ export default {
})
},
- // 切换鼠标滚轮的行为
- mousewheelActionChange(e) {
+ // 本地配置
+ updateLocalConfig(key, value) {
this.setLocalConfig({
- mousewheelAction: e
+ [key]: value
})
- this.mindMap.updateConfig
}
}
}
diff --git a/web/src/pages/Edit/components/Edit.vue b/web/src/pages/Edit/components/Edit.vue
index 15ff7891..6eb7d9db 100644
--- a/web/src/pages/Edit/components/Edit.vue
+++ b/web/src/pages/Edit/components/Edit.vue
@@ -22,7 +22,7 @@
-
+
@@ -138,7 +138,8 @@ export default {
isZenMode: state => state.localConfig.isZenMode,
openNodeRichText: state => state.localConfig.openNodeRichText,
useLeftKeySelectionRightKeyDrag: state =>
- state.localConfig.useLeftKeySelectionRightKeyDrag
+ state.localConfig.useLeftKeySelectionRightKeyDrag,
+ isShowScrollbar: state => state.localConfig.isShowScrollbar
})
},
watch: {
diff --git a/web/src/store.js b/web/src/store.js
index 160ce417..c9808b36 100644
--- a/web/src/store.js
+++ b/web/src/store.js
@@ -15,7 +15,9 @@ const store = new Vuex.Store({
// 是否开启节点富文本
openNodeRichText: true,
// 鼠标行为
- useLeftKeySelectionRightKeyDrag: false
+ useLeftKeySelectionRightKeyDrag: false,
+ // 是否显示滚动条
+ isShowScrollbar: false
},
activeSidebar: '', // 当前显示的侧边栏
isDark: false,// 是否是暗黑模式
From 075e578bb45bc27605694f0183a694124016fda9 Mon Sep 17 00:00:00 2001
From: wanglin2 <1013335014@qq.com>
Date: Sat, 2 Sep 2023 09:53:05 +0800
Subject: [PATCH 35/38] =?UTF-8?q?Feat:=E6=94=AF=E6=8C=81=E5=9C=A8url?=
=?UTF-8?q?=E4=B8=AD=E9=80=9A=E8=BF=87fileURL=E6=9F=A5=E8=AF=A2=E5=8F=82?=
=?UTF-8?q?=E6=95=B0=E6=89=93=E5=BC=80=E6=8C=87=E5=AE=9A=E7=9A=84=E5=9C=A8?=
=?UTF-8?q?=E7=BA=BF=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
web/src/pages/Edit/components/Edit.vue | 25 +++++++++++++++++++
web/src/pages/Edit/components/Import.vue | 31 ++++++++++++++++++++++++
2 files changed, 56 insertions(+)
diff --git a/web/src/pages/Edit/components/Edit.vue b/web/src/pages/Edit/components/Edit.vue
index 6eb7d9db..d4141aed 100644
--- a/web/src/pages/Edit/components/Edit.vue
+++ b/web/src/pages/Edit/components/Edit.vue
@@ -74,6 +74,7 @@ import OutlineEdit from './OutlineEdit.vue'
import { showLoading, hideLoading } from '@/utils/loading'
import handleClipboardText from '@/utils/handleClipboardText'
import Scrollbar from './Scrollbar.vue'
+import exampleData from 'simple-mind-map/example/exampleData'
// 注册插件
MindMap.usePlugin(MiniMap)
@@ -261,7 +262,20 @@ export default {
* @Desc: 初始化
*/
init() {
+ let hasFileURL = this.hasFileURL()
let { root, layout, theme, view, config } = this.mindMapData
+ // 如果url中存在要打开的文件,那么思维导图数据、主题、布局都使用默认的
+ if (hasFileURL) {
+ root = {
+ "data": {
+ "text": "根节点"
+ },
+ "children": []
+ }
+ layout = exampleData.layout
+ theme = exampleData.theme
+ view = null
+ }
this.mindMap = new MindMap({
el: this.$refs.mindMapContainer,
data: root,
@@ -376,6 +390,17 @@ export default {
if (window.takeOverApp) {
this.$bus.$emit('app_inited', this.mindMap)
}
+ // 解析url中的文件
+ if (hasFileURL) {
+ this.$bus.$emit('handle_file_url')
+ }
+ },
+
+ // url中是否存在要打开的文件
+ hasFileURL() {
+ const fileURL = this.$route.query.fileURL
+ if (!fileURL) return false
+ return /\.(smm|json|xmind|md|xlsx)$/.test(fileURL)
},
/**
diff --git a/web/src/pages/Edit/components/Import.vue b/web/src/pages/Edit/components/Import.vue
index d2d865e1..1693ccbb 100644
--- a/web/src/pages/Edit/components/Import.vue
+++ b/web/src/pages/Edit/components/Import.vue
@@ -59,15 +59,46 @@ export default {
},
created() {
this.$bus.$on('showImport', this.handleShowImport)
+ this.$bus.$on('handle_file_url', this.handleFileURL)
},
beforeDestroy() {
this.$bus.$off('showImport', this.handleShowImport)
+ this.$bus.$off('handle_file_url', this.handleFileURL)
},
methods: {
handleShowImport() {
this.dialogVisible = true
},
+ // 检查url中是否操作需要打开的文件
+ async handleFileURL() {
+ try {
+ const fileURL = this.$route.query.fileURL
+ if (!fileURL) return
+ const macth = /\.(smm|json|xmind|md|xlsx)$/.exec(fileURL)
+ if (!macth) {
+ return
+ }
+ const type = macth[1]
+ const res = await fetch(fileURL)
+ const file = await res.blob()
+ const data = {
+ raw: file
+ }
+ if (type === 'smm' || type === 'json') {
+ this.handleSmm(data)
+ } else if (type === 'xmind') {
+ this.handleXmind(data)
+ } else if (type === 'xlsx') {
+ this.handleExcel(data)
+ } else if (type === 'md') {
+ this.handleMd(data)
+ }
+ } catch (error) {
+ console.log(error)
+ }
+ },
+
/**
* @Author: 王林
* @Date: 2021-08-03 22:48:42
From 5d1f460a94fff36065f124303d8e7daecfa3e697 Mon Sep 17 00:00:00 2001
From: wanglin2 <1013335014@qq.com>
Date: Sat, 2 Sep 2023 20:58:20 +0800
Subject: [PATCH 36/38] =?UTF-8?q?Feat:=E9=B1=BC=E9=AA=A8=E5=9B=BE=E6=94=AF?=
=?UTF-8?q?=E6=8C=81=E8=AE=BE=E7=BD=AE=E8=8A=82=E7=82=B9margin?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
simple-mind-map/src/layouts/Fishbone.js | 22 +++++++++------
simple-mind-map/src/layouts/fishboneUtils.js | 29 ++++++++++++--------
simple-mind-map/src/themes/classic.js | 1 +
3 files changed, 32 insertions(+), 20 deletions(-)
diff --git a/simple-mind-map/src/layouts/Fishbone.js b/simple-mind-map/src/layouts/Fishbone.js
index b11c2634..0706caba 100644
--- a/simple-mind-map/src/layouts/Fishbone.js
+++ b/simple-mind-map/src/layouts/Fishbone.js
@@ -56,10 +56,11 @@ class Fishbone extends Base {
}
// 计算二级节点的top值
if (parent._node.isRoot) {
+ let marginY = this.getMarginY(layerIndex)
if (this.checkIsTop(newNode)) {
- newNode.top = parent._node.top - newNode.height
+ newNode.top = parent._node.top - newNode.height - marginY
} else {
- newNode.top = parent._node.top + parent._node.height
+ newNode.top = parent._node.top + parent._node.height + marginY
}
}
}
@@ -80,15 +81,16 @@ class Fishbone extends Base {
null,
(node, parent, isRoot, layerIndex) => {
if (node.isRoot) {
- let topTotalLeft = node.left + node.width + node.height
- let bottomTotalLeft = node.left + node.width + node.height
+ let marginX = this.getMarginX(layerIndex + 1)
+ let topTotalLeft = node.left + node.width + node.height + marginX
+ let bottomTotalLeft = node.left + node.width + node.height + marginX
node.children.forEach(item => {
if (this.checkIsTop(item)) {
item.left = topTotalLeft
- topTotalLeft += item.width
+ topTotalLeft += item.width + marginX
} else {
item.left = bottomTotalLeft + 20
- bottomTotalLeft += item.width
+ bottomTotalLeft += item.width + marginX
}
})
}
@@ -154,9 +156,10 @@ class Fishbone extends Base {
getNodeAreaHeight(node) {
let totalHeight = 0
let loop = node => {
+ let marginY = this.getMarginY(node.layerIndex)
totalHeight +=
node.height +
- (this.getNodeActChildrenLength(node) > 0 ? node.expandBtnSize : 0)
+ (this.getNodeActChildrenLength(node) > 0 ? node.expandBtnSize : 0) + marginY
if (node.children.length) {
node.children.forEach(item => {
loop(item)
@@ -244,8 +247,9 @@ class Fishbone extends Base {
maxx = item.left
}
// 水平线段到二级节点的连线
+ let marginY = this.getMarginY(item.layerIndex)
let nodeLineX = item.left
- let offset = node.height / 2
+ let offset = node.height / 2 + marginY
let offsetX = offset / Math.tan(degToRad(this.mindMap.opt.fishboneDeg))
let line = this.draw.path()
if (this.checkIsTop(item)) {
@@ -267,7 +271,7 @@ class Fishbone extends Base {
})
// 从根节点出发的水平线
let nodeHalfTop = node.top + node.height / 2
- let offset = node.height / 2
+ let offset = node.height / 2 + this.getMarginY(node.layerIndex + 1)
let line = this.draw.path()
line.plot(
`M ${node.left + node.width},${nodeHalfTop} L ${
diff --git a/simple-mind-map/src/layouts/fishboneUtils.js b/simple-mind-map/src/layouts/fishboneUtils.js
index ec47f1e5..e95e2ec2 100644
--- a/simple-mind-map/src/layouts/fishboneUtils.js
+++ b/simple-mind-map/src/layouts/fishboneUtils.js
@@ -47,30 +47,32 @@ export default {
computedLeftTopValue({ layerIndex, node, ctx }) {
if (layerIndex >= 1 && node.children) {
// 遍历三级及以下节点的子节点
+ let marginY = ctx.getMarginY(layerIndex + 1)
let startLeft = node.left + node.width * ctx.childIndent
let totalTop =
node.top +
node.height +
- (ctx.getNodeActChildrenLength(node) > 0 ? node.expandBtnSize : 0)
+ (ctx.getNodeActChildrenLength(node) > 0 ? node.expandBtnSize : 0) + marginY
node.children.forEach(item => {
item.left = startLeft
item.top += totalTop
totalTop +=
item.height +
- (ctx.getNodeActChildrenLength(item) > 0 ? item.expandBtnSize : 0)
+ (ctx.getNodeActChildrenLength(item) > 0 ? item.expandBtnSize : 0) + marginY
})
}
},
- adjustLeftTopValueBefore({ node, parent, ctx }) {
+ adjustLeftTopValueBefore({ node, parent, ctx, layerIndex }) {
// 调整top
let len = node.children.length
+ let marginY = ctx.getMarginY(layerIndex + 1)
// 调整三级及以下节点的top
if (parent && !parent.isRoot && len > 0) {
let totalHeight = node.children.reduce((h, item) => {
return (
h +
item.height +
- (ctx.getNodeActChildrenLength(item) > 0 ? item.expandBtnSize : 0)
+ (ctx.getNodeActChildrenLength(item) > 0 ? item.expandBtnSize : 0) + marginY
)
}, 0)
ctx.updateBrothersTop(node, totalHeight)
@@ -80,7 +82,8 @@ export default {
// 将二级节点的子节点移到上方
if (parent && parent.isRoot) {
// 遍历二级节点的子节点
- let totalHeight = node.expandBtnSize
+ let marginY = ctx.getMarginY(node.layerIndex + 1)
+ let totalHeight = node.expandBtnSize + marginY
node.children.forEach(item => {
// 调整top
let nodeTotalHeight = ctx.getNodeAreaHeight(item)
@@ -134,13 +137,14 @@ export default {
}
},
computedLeftTopValue({ layerIndex, node, ctx }) {
+ let marginY = ctx.getMarginY(layerIndex + 1)
if (layerIndex === 1 && node.children) {
// 遍历二级节点的子节点
let startLeft = node.left + node.width * ctx.childIndent
let totalTop =
node.top +
node.height +
- (ctx.getNodeActChildrenLength(node) > 0 ? node.expandBtnSize : 0)
+ (ctx.getNodeActChildrenLength(node) > 0 ? node.expandBtnSize : 0) + marginY
node.children.forEach(item => {
item.left = startLeft
@@ -149,7 +153,7 @@ export default {
(ctx.getNodeActChildrenLength(item) > 0 ? item.expandBtnSize : 0)
totalTop +=
item.height +
- (ctx.getNodeActChildrenLength(item) > 0 ? item.expandBtnSize : 0)
+ (ctx.getNodeActChildrenLength(item) > 0 ? item.expandBtnSize : 0) + marginY
})
}
if (layerIndex > 1 && node.children) {
@@ -157,25 +161,26 @@ export default {
let startLeft = node.left + node.width * ctx.childIndent
let totalTop =
node.top -
- (ctx.getNodeActChildrenLength(node) > 0 ? node.expandBtnSize : 0)
+ (ctx.getNodeActChildrenLength(node) > 0 ? node.expandBtnSize : 0) - marginY
node.children.forEach(item => {
item.left = startLeft
item.top = totalTop - item.height
totalTop -=
item.height +
- (ctx.getNodeActChildrenLength(item) > 0 ? item.expandBtnSize : 0)
+ (ctx.getNodeActChildrenLength(item) > 0 ? item.expandBtnSize : 0) + marginY
})
}
},
adjustLeftTopValueBefore({ node, ctx, layerIndex }) {
// 调整top
+ let marginY = ctx.getMarginY(layerIndex + 1)
let len = node.children.length
if (layerIndex > 2 && len > 0) {
let totalHeight = node.children.reduce((h, item) => {
return (
h +
item.height +
- (ctx.getNodeActChildrenLength(item) > 0 ? item.expandBtnSize : 0)
+ (ctx.getNodeActChildrenLength(item) > 0 ? item.expandBtnSize : 0) + marginY
)
}, 0)
ctx.updateBrothersTop(node, -totalHeight)
@@ -185,6 +190,7 @@ export default {
// 将二级节点的子节点移到上方
if (parent && parent.isRoot) {
// 遍历二级节点的子节点
+ let marginY = ctx.getMarginY(node.layerIndex + 1)
let totalHeight = 0
let totalHeight2 = node.expandBtnSize
node.children.forEach(item => {
@@ -192,11 +198,12 @@ export default {
let hasChildren = ctx.getNodeActChildrenLength(item) > 0
let nodeTotalHeight = ctx.getNodeAreaHeight(item)
let offset =
- hasChildren > 0
+ hasChildren
? nodeTotalHeight -
item.height -
(hasChildren ? item.expandBtnSize : 0)
: 0
+ offset -= (hasChildren ? marginY : 0)
let _top = totalHeight + offset
let _left = item.left
item.top += _top
diff --git a/simple-mind-map/src/themes/classic.js b/simple-mind-map/src/themes/classic.js
index e58a7d3d..792026cf 100644
--- a/simple-mind-map/src/themes/classic.js
+++ b/simple-mind-map/src/themes/classic.js
@@ -18,6 +18,7 @@ export default merge(defaultTheme, {
'data:image/png;base64,iVBORw0KGgoAAAANS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ThBODREODNFNkM3Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+e9P33AAAACVJREFUeNpisXJ0YUACTAyoAMr/+eM7EGGRZ4FQ7BycEAZAgAEAHbEGtkoQm/wAAAAASUVORK5CYII=',
// 背景重复
backgroundRepeat: 'repeat',
+ backgroundSize: 'auto',
// 根节点样式
root: {
fillColor: 'rgb(233, 223, 152)',
From a4611d11a8926f72347a62a179b397659b30bdb7 Mon Sep 17 00:00:00 2001
From: wanglin2 <1013335014@qq.com>
Date: Mon, 4 Sep 2023 16:49:24 +0800
Subject: [PATCH 37/38] Doc: update
---
README.md | 4 +
web/src/assets/avatar/南风.jpg | Bin 0 -> 34225 bytes
web/src/pages/Doc/catalogList.js | 3 +-
web/src/pages/Doc/en/changelog/index.md | 50 +
web/src/pages/Doc/en/changelog/index.vue | 31 +
web/src/pages/Doc/en/constructor/index.md | 14 +-
web/src/pages/Doc/en/constructor/index.vue | 1065 +------------------
web/src/pages/Doc/en/doExport/index.md | 8 +-
web/src/pages/Doc/en/doExport/index.vue | 10 +-
web/src/pages/Doc/en/introduction/index.md | 4 +
web/src/pages/Doc/en/introduction/index.vue | 4 +
web/src/pages/Doc/en/node/index.md | 6 +-
web/src/pages/Doc/en/node/index.vue | 8 +-
web/src/pages/Doc/en/scrollbar/index.md | 64 ++
web/src/pages/Doc/en/scrollbar/index.vue | 70 ++
web/src/pages/Doc/en/search/index.md | 2 +-
web/src/pages/Doc/en/search/index.vue | 2 +-
web/src/pages/Doc/routerList.js | 8 +-
web/src/pages/Doc/zh/changelog/index.md | 50 +
web/src/pages/Doc/zh/changelog/index.vue | 31 +
web/src/pages/Doc/zh/constructor/index.md | 14 +-
web/src/pages/Doc/zh/constructor/index.vue | 52 +-
web/src/pages/Doc/zh/course23/index.md | 116 ++
web/src/pages/Doc/zh/course23/index.vue | 112 ++
web/src/pages/Doc/zh/course24/index.md | 65 ++
web/src/pages/Doc/zh/course24/index.vue | 60 ++
web/src/pages/Doc/zh/course3/index.md | 22 +
web/src/pages/Doc/zh/course3/index.vue | 15 +
web/src/pages/Doc/zh/doExport/index.md | 8 +-
web/src/pages/Doc/zh/doExport/index.vue | 10 +-
web/src/pages/Doc/zh/introduction/index.md | 4 +
web/src/pages/Doc/zh/introduction/index.vue | 4 +
web/src/pages/Doc/zh/node/index.md | 6 +-
web/src/pages/Doc/zh/node/index.vue | 4 +-
web/src/pages/Doc/zh/scrollbar/index.md | 64 ++
web/src/pages/Doc/zh/scrollbar/index.vue | 70 ++
36 files changed, 966 insertions(+), 1094 deletions(-)
create mode 100644 web/src/assets/avatar/南风.jpg
create mode 100644 web/src/pages/Doc/en/scrollbar/index.md
create mode 100644 web/src/pages/Doc/en/scrollbar/index.vue
create mode 100644 web/src/pages/Doc/zh/course23/index.md
create mode 100644 web/src/pages/Doc/zh/course23/index.vue
create mode 100644 web/src/pages/Doc/zh/course24/index.md
create mode 100644 web/src/pages/Doc/zh/course24/index.vue
create mode 100644 web/src/pages/Doc/zh/scrollbar/index.md
create mode 100644 web/src/pages/Doc/zh/scrollbar/index.vue
diff --git a/README.md b/README.md
index dd269b3a..04935180 100644
--- a/README.md
+++ b/README.md
@@ -169,4 +169,8 @@ const mindMap = new MindMap({
布林
+
+
+ 南风
+
\ No newline at end of file
diff --git a/web/src/assets/avatar/南风.jpg b/web/src/assets/avatar/南风.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..562987e90f6a08462e766be663b67300bd842b59
GIT binary patch
literal 34225
zcmbTe2|U#M7eD-&jVQE?lF(wC;VRYWqSQ#llx@aR(yC=i(Yp^Ljncqt};-F}|PAIp=-e=Y7s+zW(vG
z84c!m`FJ4`2_bLzhrT{Vb3GFTD-rVbMRo|G0f`D>%cOdjuuoM-y@Qt>Om2l3dNcsN*NzWdL;=rpxM
zq<8Su-!nIVy@ZAgpgL2XDWq|TJcL9ULi&0QjfT6Rk%$lC*WeS0Org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Cwq~PdcjzaUiRa@~p#?t9e_0-}fVk8FX
z<*?s*@`zs+Ti^DTR~IuZk-)%)rUqEWt>o~M!BH40j;x+o+KTx<`_8K}syZ|mK70h_
z6!DZS!q6DVQHmo8``vMLG$WkGe@laU$|x)R>0!$
zvdQpqiR#C<(axZI;u`2$Vw>_K>2g`-1$b_O3vrE2f1;UEv8q!tr?%#>Ooo)vOQKsb
z8B6eT`SK^cN?nGMv8OMR8zIj~vJMtXKiSe0=|&M4N?VC=7
zG8dNmbcv3z7KJC+CeR%4jKZB0Pc-e(oCtf%n?;hc{SVnc(2g=!{rER4z_PEWBo)iA
zPRP?ADj8~VN_HXfM{@pkySK@ucAd{Mun>!S5dY&7?`>TR>S0)tUT}ocFi*TtzQ@K5
zlEE?~ge<|@-JOSfYf-MDFWxA3527^=G_TT;C$s_EkwYyIYDF^c00p{dgXDi=xZDAr
z{Mp*vXH^iXvY=6O=v6dazzMQpA=)fj&$zw67qa_G5CV*5G;R4m}QsF)w)d$S#)FrPvz5B
z+OMx&=WKqYo6QflF{A)IQfbQFLs~Qb6gWf>kQ_NMKjr=;uMlw((G5r)Ql21nEDvDG
zph?&?&!ELj4gzdgA;U^qyjUT#P!vzw5Q_Gd_g@Xp<>&*rs({@|dHd~mCq_sYt6?y;Du7DRCNr#1plTwZ}CKb^P!5<`g`~~ON2szV}LJ!
x*^m=7Z~Q~{m8&~<;;i#Xxsu1`;wdr?OnWoGbRFG+*FXA0R%c!+-PZr<{{g {
+let CourseList = new Array(24).fill(0).map((_, index) => {
return 'course' + (index + 1)
})
let APIList = [
@@ -34,6 +34,7 @@ let APIList = [
'nodeImgAdjust',
'search',
'painter',
+ 'scrollbar',
'xmind',
'markdown',
'utils'
diff --git a/web/src/pages/Doc/en/changelog/index.md b/web/src/pages/Doc/en/changelog/index.md
index 2122c69f..19a4a42d 100644
--- a/web/src/pages/Doc/en/changelog/index.md
+++ b/web/src/pages/Doc/en/changelog/index.md
@@ -1,5 +1,55 @@
# Changelog
+## 0.7.0
+
+Breaking change: Removed the section of node activation style in the theme file, Setting the activation style of nodes is no longer supported, and the activation effect has been changed to a unified node outer border style, while also supporting the mouse hover effect.
+
+Fix:
+
+> 1.Fix rendering anomalies when the node border size is relatively large.
+>
+> 2.Fixed an issue where the node style of the associated line will not be updated when switching themes.
+>
+> 3.Fix that selecting all did not trigger node_ The issue with active events.
+
+新增:
+
+> 1.When folding nodes, displays the number of collapsed nodes.
+>
+> 2.Support the position of the endpoint of the associated line to follow mouse drag changes.
+>
+> 3.Add a scrollbar plugin.
+>
+> 4.Support opening specified online files through fileURL query parameters in URLs.
+>
+> 5.The fishbone diagram supports setting node margins.
+>
+> 6.By default, double-click to reset the canvas.
+>
+> 7.Modify the parameters of the export image method, and when exporting PDF, if the size of the mind map is smaller than A4 paper, do not rotate the direction.
+>
+> 8.Improve the clarity of exported images and PDFs on high-definition screens.
+>
+> 9.Add a pre destruction lifecycle function to the plugin to address the issue of some side effects that were not cleared during the destruction of the mind map.
+>
+> 10.Optimize the settings of the basic style and do not trigger full rendering when modifying theme attributes that do not affect size.
+>
+> 11.Prohibit triggering node right-click menu events when multiple node selections are completed, to avoid triggering the right-click menu display.
+>
+> 12.Optimize the Select plugin so that if multiple selected nodes do not change, the activation event is not triggered.
+>
+> 13.The activation node list thrown by event node_active no longer directly references the internal activation list.
+>
+> 14.Optimize the logic of mouse button down node events, and support dragging the canvas by holding down the root node with the right mouse button in the right-click drag and drop canvas mode.
+
+Demo:
+
+> 1.Do not directly reference the internal activation node list to optimize performance.
+>
+> 2.Support configuring whether to display scrollbars.
+>
+> 3.Delete the active node configuration in the sidebar node style configuration section.
+
## 0.6.17
Fix:
diff --git a/web/src/pages/Doc/en/changelog/index.vue b/web/src/pages/Doc/en/changelog/index.vue
index e0c5e977..cdcf02fe 100644
--- a/web/src/pages/Doc/en/changelog/index.vue
+++ b/web/src/pages/Doc/en/changelog/index.vue
@@ -1,6 +1,37 @@
Changelog
+
0.7.0
+
Breaking change: Removed the section of node activation style in the theme file, Setting the activation style of nodes is no longer supported, and the activation effect has been changed to a unified node outer border style, while also supporting the mouse hover effect.
+
Fix:
+
+1.Fix rendering anomalies when the node border size is relatively large.
+2.Fixed an issue where the node style of the associated line will not be updated when switching themes.
+3.Fix that selecting all did not trigger node_ The issue with active events.
+
+
新增:
+
+1.When folding nodes, displays the number of collapsed nodes.
+2.Support the position of the endpoint of the associated line to follow mouse drag changes.
+3.Add a scrollbar plugin.
+4.Support opening specified online files through fileURL query parameters in URLs.
+5.The fishbone diagram supports setting node margins.
+6.By default, double-click to reset the canvas.
+7.Modify the parameters of the export image method, and when exporting PDF, if the size of the mind map is smaller than A4 paper, do not rotate the direction.
+8.Improve the clarity of exported images and PDFs on high-definition screens.
+9.Add a pre destruction lifecycle function to the plugin to address the issue of some side effects that were not cleared during the destruction of the mind map.
+10.Optimize the settings of the basic style and do not trigger full rendering when modifying theme attributes that do not affect size.
+11.Prohibit triggering node right-click menu events when multiple node selections are completed, to avoid triggering the right-click menu display.
+12.Optimize the Select plugin so that if multiple selected nodes do not change, the activation event is not triggered.
+13.The activation node list thrown by event node_active no longer directly references the internal activation list.
+14.Optimize the logic of mouse button down node events, and support dragging the canvas by holding down the root node with the right mouse button in the right-click drag and drop canvas mode.
+
+
Demo:
+
+1.Do not directly reference the internal activation node list to optimize performance.
+2.Support configuring whether to display scrollbars.
+3.Delete the active node configuration in the sidebar node style configuration section.
+
0.6.17
Fix:
diff --git a/web/src/pages/Doc/en/constructor/index.md b/web/src/pages/Doc/en/constructor/index.md
index 837f3268..4bf81074 100644
--- a/web/src/pages/Doc/en/constructor/index.md
+++ b/web/src/pages/Doc/en/constructor/index.md
@@ -48,8 +48,10 @@ const mindMap = new MindMap({
| mousewheelZoomActionReverse(v0.6.5+) | Boolean | false | When `mousewheelAction` is set to `zoom`, the default scrolling forward is to zoom out, and scrolling backward is to zoom in. If this property is set to true, it will be reversed | |
| defaultInsertSecondLevelNodeText(v0.4.7+) | String | 二级节点 | Text of the default inserted secondary node | |
| defaultInsertBelowSecondLevelNodeText(v0.4.7+) | String | 分支主题 | Text for nodes below the second level inserted by default | |
-| expandBtnStyle(v0.5.0+) | Object | { color: '#808080', fill: '#fff' } | Expand the color of the stow button | |
+| expandBtnStyle(v0.5.0+) | Object | { color: '#808080', fill: '#fff', fontSize: 13, strokeColor: '#333333' } | Expand the color of the stow button, (The fontSize and strokeColor fields were added in version 0.7.0+to set the text style for displaying the number of nodes when folded) | |
| expandBtnIcon(v0.5.0+) | Object | { open: '', close: '' } | Customize the icon of the expand/collapse button, and you can transfer the svg string of the icon | |
+| expandBtnNumHandler(v0.7.0+) | Function | | Used to customize the content of displaying the number of nodes when folding, receiving a parameter that represents the instance of the folding node, and returning a number or string that represents the final displayed content. For example, when the number is greater than 99, 99 can be displayed+ | |
+| isShowExpandNum(v0.7.0+) | Boolean | true | Display the number of folded nodes when they are folded up | |
| enableShortcutOnlyWhenMouseInSvg(v0.5.1+) | Boolean | true | Only respond to shortcut key events when the mouse is inside the canvas | |
| enableNodeTransitionMove(v0.5.1+)(v0.6.7+ is remove this feature) | Boolean | true | Whether to enable node animation transition | |
| nodeTransitionMoveDuration(v0.5.1+)(v0.6.7+ is remove this feature) | Number | 300 | If node animation transition is enabled, the transition time can be set using this attribute, in milliseconds | |
@@ -80,7 +82,11 @@ const mindMap = new MindMap({
| errorHandler(v0.6.15+) | Function | | Custom error handling functions currently only throw some asynchronous logic errors. Can pass a function that takes two parameters, the first being the wrong type and the second being the wrong object | |
| disableMouseWheelZoom(v0.6.15+) | Boolean | false | Prohibit mouse wheel scaling, you can still use the API for scaling | |
| resetCss(v0.6.16+) | String | * { margin: 0; padding: 0; box-sizing: border-box; } | When exporting images and SVGs, the default style overlay for rich text node content, which is embedded in HTML nodes in SVGs, will occur. If not overlaid, the node content will be offset | |
-| enableDblclickReset(v0.6.17+) | Boolean | true | Turn on the mouse and double-click to reset the position and zoom of the mind map | |
+| enableDblclickReset(v0.6.17+) | Boolean | true(v0.7.0+changed to false) | Turn on the mouse and double-click to reset the position and zoom of the mind map | |
+| minExportImgCanvasScale(v0.7.0+) | Number | 2 | The scaling factor of canvas when exporting images and PDFs, which is set to the maximum value of window.devicePixelRatio to improve image clarity | |
+| hoverRectColor(v0.7.0+) | String | rgb(94, 200, 248) | The node mouse hover and the rectangular border color displayed when activated will add a transparency of 0.6 when hovering | |
+| hoverRectPadding(v0.7.0+) | Number | 2 | The distance between the node mouse hover and the displayed rectangular border when activated and the node content | |
+| selectTextOnEnterEditText(v0.7.0+) | Boolean | true | Is the text selected by default when double-clicking a node to enter node text editing? By default, it will only be selected when creating a new node | |
### Watermark config
@@ -337,8 +343,8 @@ redo. All commands are as follows:
| DOWN_NODE | Move node down, the active node will be the operation node. If there are multiple active nodes, only the first one will be effective. Using this command on the root node or the last node in the list will be invalid | |
| REMOVE_NODE | Remove node, the active node or appoint node will be the operation node | appointNodes(v0.4.7+, Optional, appoint node, Specifying multiple nodes can pass an array) |
| PASTE_NODE | Paste node to a node, the active node will be the operation node | data (the node data to paste, usually obtained through the renderer.copyNode() and renderer.cutNode() methods) |
-| SET_NODE_STYLE | Modify node single style | node (the node to set the style of), prop (style property), value (style property value), isActive (boolean, whether the style being set is for the active state) |
-| SET_NODE_STYLEs(v0.6.12+) | Modify multiple styles of nodes | node(the node to set the style of)、style(Style object,key is style prop,value is style value)、isActive(boolean, whether the style being set is for the active state) |
+| SET_NODE_STYLE | Modify node single style | node (the node to set the style of), prop (style property), value (style property value), isActive (v0.7.0+has been abandoned, boolean, whether the style being set is for the active state) |
+| SET_NODE_STYLEs(v0.6.12+) | Modify multiple styles of nodes | node(the node to set the style of)、style(Style object,key is style prop,value is style value)、isActive(v0.7.0+has been abandoned, boolean, whether the style being set is for the active state) |
| SET_NODE_ACTIVE | Set whether the node is active | node (the node to set), active (boolean, whether to activate) |
| CLEAR_ACTIVE_NODE | Clear the active state of the currently active node(s), the active node will be the operation node | |
| SET_NODE_EXPAND | Set whether the node is expanded | node (the node to set), expand (boolean, whether to expand) |
diff --git a/web/src/pages/Doc/en/constructor/index.vue b/web/src/pages/Doc/en/constructor/index.vue
index 3df147c2..85fadc3a 100644
--- a/web/src/pages/Doc/en/constructor/index.vue
+++ b/web/src/pages/Doc/en/constructor/index.vue
@@ -1,1069 +1,6 @@
-
Constructor
-
Basic use
-
<div id ="mindMapContainer" > </div >
-
-
import MindMap from "simple-mind-map" ;
-
-const mindMap = new MindMap({
- el : document .getElementById("mindMapContainer" ),
- data : {
- "data" : {
- "text" : "Root Node"
- },
- "children" : []
- }
-});
-
-
Instantiation options
-
-
-
-Field Name
-Type
-Default Value
-Description
-Required
-
-
-
-
-el
-Element
-
-Container element, must be a DOM element
-Yes
-
-
-data
-Object
-{}
-Mind map data, refer to: exampleData.js
-
-
-
-layout
-String
-logicalStructure
-Layout type, options: logicalStructure (logical structure diagram), mindMap (mind map), catalogOrganization (catalog organization diagram), organizationStructure (organization structure diagram)、timeline(v0.5.4+, timeline)、timeline2(v0.5.4+, up down alternating timeline)、fishbone(v0.5.4+, fishbone diagram)
-
-
-
-fishboneDeg(v0.5.4+)
-Number
-45
-Set the diagonal angle of the fishbone structure diagram
-
-
-
-theme
-String
-default
-Theme, options: default, classic, minions, pinkGrape, mint, gold, vitalityOrange, greenLeaf, dark2, skyGreen, classic2, classic3, classic4(v0.2.0+), classicGreen, classicBlue, blueSky, brainImpairedPink, dark, earthYellow, freshGreen, freshRed, romanticPurple, simpleBlack(v0.5.4+), courseGreen(v0.5.4+), coffee(v0.5.4+), redSpirit(v0.5.4+), blackHumour(v0.5.4+), lateNightOffice(v0.5.4+), blackGold(v0.5.4+)、、avocado(v.5.10-fix.2+)、autumn(v.5.10-fix.2+)、orangeJuice(v.5.10-fix.2+)
-
-
-
-themeConfig
-Object
-{}
-Theme configuration, will be merged with the selected theme, available fields refer to: default.js
-
-
-
-scaleRatio
-Number
-0.1
-The incremental scaling ratio
-
-
-
-maxTag
-Number
-5
-The maximum number of tags displayed in the node, any additional tags will be discarded
-
-
-
-exportPadding
-Number
-20
-The padding for exporting images
-
-
-
-imgTextMargin
-Number
-5
-The spacing between the image and text in the node
-
-
-
-textContentMargin
-Number
-2
-The spacing between various text information in the node, such as the spacing between the icon and text
-
-
-
-selectTranslateStep
-Number
-3
-The canvas offset when mouse moves to the edge during multi-select node
-
-
-
-selectTranslateLimit
-Number
-20
-The distance from the edge when the canvas begins to offset during multi-select node
-
-
-
-customNoteContentShow(v0.1.6+)
-Object
-null
-Custom node note content display, object type, structure: {show: (noteContent, left, top) => {// your display node note logic }, hide: () => {// your hide node note logic }}
-
-
-
-readonly(v0.1.7+)
-Boolean
-false
-Whether it is read-only mode
-
-
-
-enableFreeDrag(v0.2.4+)
-Boolean
-false
-Enable node free drag
-
-
-
-watermarkConfig(v0.2.4+)
-Object
-
-Watermark config, Please refer to the table 【Watermark config】 below for detailed configuration
-
-
-
-textAutoWrapWidth(v0.3.4+)
-Number
-500
-Each line of text in the node will wrap automatically when it reaches the width
-
-
-
-customHandleMousewheel(v0.4.3+)
-Function
-null
-User-defined mouse wheel event processing can pass a function, and the callback parameter is the event object
-
-
-
-mousewheelAction(v0.4.3+)
-String
-zoom
-The behavior of the mouse wheel, zoom(Zoom in and out)、move(Move up and down). If customHandleMousewheel passes a custom function, this property will not take effect
-
-
-
-mousewheelMoveStep(v0.4.3+)
-Number
-100
-When the mousewheelAction is set to move, you can use this attribute to control the step length of the view movement when the mouse scrolls. The unit is px
-
-
-
-mousewheelZoomActionReverse(v0.6.5+)
-Boolean
-false
-When mousewheelAction is set to zoom, the default scrolling forward is to zoom out, and scrolling backward is to zoom in. If this property is set to true, it will be reversed
-
-
-
-defaultInsertSecondLevelNodeText(v0.4.7+)
-String
-二级节点
-Text of the default inserted secondary node
-
-
-
-defaultInsertBelowSecondLevelNodeText(v0.4.7+)
-String
-分支主题
-Text for nodes below the second level inserted by default
-
-
-
-expandBtnStyle(v0.5.0+)
-Object
-{ color: '#808080', fill: '#fff' }
-Expand the color of the stow button
-
-
-
-expandBtnIcon(v0.5.0+)
-Object
-{ open: '', close: '' }
-Customize the icon of the expand/collapse button, and you can transfer the svg string of the icon
-
-
-
-enableShortcutOnlyWhenMouseInSvg(v0.5.1+)
-Boolean
-true
-Only respond to shortcut key events when the mouse is inside the canvas
-
-
-
-enableNodeTransitionMove(v0.5.1+)(v0.6.7+ is remove this feature)
-Boolean
-true
-Whether to enable node animation transition
-
-
-
-nodeTransitionMoveDuration(v0.5.1+)(v0.6.7+ is remove this feature)
-Number
-300
-If node animation transition is enabled, the transition time can be set using this attribute, in milliseconds
-
-
-
-initRootNodePosition(v0.5.3+)
-Array
-null
-The position of the initial root node can be passed as an array, default is ['center', 'center'], Represents the root node at the center of the canvas, In addition to center, keywords can also be set to left, top, right, and bottom, In addition to passing keywords, each item in the array can also pass a number representing a specific pixel, Can pass a percentage string, such as ['40%', '60%'], Represents a horizontal position at 40% of the canvas width, and a vertical position at 60% of the canvas height
-
-
-
-exportPaddingX(v0.5.5+)
-Number
-10
-Horizontal padding of graphics when exporting PNG, SVG, and PDF
-
-
-
-exportPaddingY(v0.5.5+)
-Number
-10
-Vertical padding of graphics when exporting PNG, SVG, and PDF
-
-
-
-nodeTextEditZIndex(v0.5.5+)
-Number
-3000
-
-z-index of node text edit box elements
-
-
-nodeNoteTooltipZIndex(v0.5.5+)
-Number
-3000
-z-index of floating layer elements in node comments
-
-
-
-isEndNodeTextEditOnClickOuter(v0.5.5+)
-Boolean
-true
-Whether to end the editing status of node text when clicking on an area outside the canvas
-
-
-
-maxHistoryCount(v0.5.6+)
-Number
-1000
-
-Maximum number of history records
-
-
-alwaysShowExpandBtn(v0.5.8+)
-Boolean
-false
-Whether to always display the expand and collapse buttons of nodes, which are only displayed when the mouse is moved up and activated by default
-
-
-
-iconList(v0.5.8+)
-Array
-[]
-The icons that can be inserted into the extension node, and each item in the array is an object. Please refer to the "Icon Configuration" table below for the detailed structure of the object
-
-
-
-maxNodeCacheCount(v0.5.10+)
-Number
-1000
-The maximum number of cached nodes. To optimize performance, an internal node cache pool is maintained to reuse nodes. This attribute allows you to specify the maximum number of caches in the pool
-
-
-
-defaultAssociativeLineText(v0.5.11+)
-String
-关联
-Association Line Default Text
-
-
-
-fitPadding(v0.6.0+)
-Number
-50
-The padding of mind mapping when adapting to canvas size, Unit: px
-
-
-
-enableCtrlKeyNodeSelection(v0.6.0+)
-Boolean
-true
-Whether to enable the function of holding down the Ctrl key to select multiple nodes
-
-
-
-useLeftKeySelectionRightKeyDrag(v0.6.0+)
-Boolean
-false
-Setting to left click to select multiple nodes and right click to drag the canvas.
-
-
-
-beforeTextEdit(v0.6.0+)
-Function/null
-null
-The callback method before the node is about to enter editing. If the method returns a value other than true, the editing will be canceled. The function can return a value or a promise, and the callback parameter is the node instance
-
-
-
-isUseCustomNodeContent(v0.6.3+)
-Boolean
-false
-Whether to customize node content
-
-
-
-customCreateNodeContent(v0.6.3+)
-Function/null
-null
-If isUseCustomNodeContent is set to true, then this option needs to be used to pass in a method that receives the node instance node as a parameter (if you want to obtain data for that node, you can use node.nodeData.data). You need to return the custom node content element, which is the DOM node. If a node does not require customization, you can return null
-
-
-
-mouseScaleCenterUseMousePosition(v0.6.4-fix.1+)
-Boolean
-true
-Is the mouse zoom centered around the current position of the mouse, otherwise centered around the canvas
-
-
-
-customInnerElsAppendTo(v0.6.12+)
-null/HTMLElement
-null
-Specify the location where some internal elements (node text editing element, node note display element, associated line text editing element, node image adjustment button element) are added, and default to document.body
-
-
-
-nodeDragPlaceholderMaxSize(v0.6.12+)
-Number
-20
-When dragging an element, the maximum height of the block indicating the new position of the element
-
-
-
-enableCreateHiddenInput(v0.6.13+)(v0.6.14+ remove this feature)
-Boolean
-true
-Is it allowed to create a hidden input box that will be focused when the node is activated for pasting data and automatically entering the text editing state
-
-
-
-enableAutoEnterTextEditWhenKeydown(v0.6.13+)
-Boolean
-true
-Does it automatically enter text editing mode when pressing the Chinese, English, or numeric buttons when there is an activation node?
-
-
-
-richTextEditFakeInPlace(v0.6.13+)
-Boolean
-false
-Set the rich text node edit box to match the size of the node, creating a pseudo in place editing effect. It should be noted that only when there is only text within the node and the shape is rectangular, can the effect be better
-
-
-
-customHandleClipboardText(v0.6.14+)
-Function
-null
-Customize the processing of clipboard text. When pressing ctrl+v to paste, it will read the text and images from the user's clipboard. By default, it will only determine whether the text is regular text and node data in simple mind map format. If you want to process data from other mind maps, such as process, zhixi, etc., you can pass a function that takes the text from the current clipboard as a parameter and returns the processed data, which can be of two types: 1.If a pure text is returned, a child node will be directly created with that text; 2.Returns a node object in the following format: { simpleMindMap: true, data: { data: { text: '' }, children: [] } }, The representative is data in simple bind map format, and the node data is in the same format as the simple bind map node data. If your processing logic has asynchronous logic, you can also return a promise
-
-
-
-errorHandler(v0.6.15+)
-Function
-
-Custom error handling functions currently only throw some asynchronous logic errors. Can pass a function that takes two parameters, the first being the wrong type and the second being the wrong object
-
-
-
-disableMouseWheelZoom(v0.6.15+)
-Boolean
-false
-Prohibit mouse wheel scaling, you can still use the API for scaling
-
-
-
-resetCss(v0.6.16+)
-String
-* { margin: 0; padding: 0; box-sizing: border-box; }
-When exporting images and SVGs, the default style overlay for rich text node content, which is embedded in HTML nodes in SVGs, will occur. If not overlaid, the node content will be offset
-
-
-
-enableDblclickReset(v0.6.17+)
-Boolean
-true
-Turn on the mouse and double-click to reset the position and zoom of the mind map
-
-
-
-
-
Watermark config
-
-
-
-Field Name
-Type
-Default Value
-Description
-
-
-
-
-text
-String
-''
-Watermark text. If it is an empty string, the watermark will not be displayed
-
-
-lineSpacing
-Number
-100
-Spacing between watermark lines
-
-
-textSpacing
-Number
-100
-Spacing between watermarks in the same row
-
-
-angle
-Number
-30
-Tilt angle of watermark, range: [0, 90]
-
-
-textStyle
-Object
-{color: '#999', opacity: 0.5, fontSize: 14}
-Watermark text style
-
-
-
-
Icon Configuration
-
-
-
-Field Name
-Type
-Default Value
-Description
-
-
-
-
-name
-String
-
-The name of the icon group
-
-
-type
-String
-
-Values for icon grouping
-
-
-list
-Array
-
-A list of icons under grouping, with each item in the array being an object, { name: '', icon: '' },namerepresents the name of the icon, iconrepresents the icon, Can be an svg icon, such as <svg ...><path></path></svg>, also can be a image url, or base64 icon, such as data:image/png;base64,...
-
-
-
-
Static methods
-
defineTheme(name, config)
-
-v0.2.23+
-
-
Define new theme.
-
name:New theme name
-
config:New theme config
-
Simple-mind-map Built-in many themes. In addition, you can register new theme. It is recommended to register before instantiation, so that you can directly use the newly registered theme during instantiation. Use example:
-
import MindMap from 'simple-mind-map'
-
-MindMap.defineTheme('Theme name' , {})
-
-
-const mindMap = new MindMap({
- theme : 'Theme name'
-})
-
-
-mindMap.setTheme('Theme name' )
-
-
For all configurations of theme, please refer to Default Topic . The defineThememethod will merge the configuration you passed in with the default configuration. Most of the themes do not need custom many parts. For a typical customized theme configuration, please refer to blueSky .
-
usePlugin(plugin, opt = {})
-
-v0.3.0+
-
-
-opt:v0.4.0+,Plugin options. If a plugin supports custom options, it can be passed in through this parameter.
-
-
If you need to use some non-core functions, such as mini map, watermark, etc, you can register plugin through this method. Can be called in chain.
-
Note: The plugin needs to be registered before instantiating MindMap.
-
hasPlugin(plugin)
-
-v0.4.0+
-
-
Get whether a plugin is registered, The index of the plugin in the registered plugin list is returned, If it is -1, it means that the plugin is not registered.
-
Static props
-
pluginList
-
-v0.3.0+
-
-
List of all currently registered plugins.
-
Instance methods
-
destroy()
-
-v0.6.0+
-
-
Destroy mind maps. It will remove registered plugins, remove listening events, and delete all nodes on the canvas.
-
getSvgData({ paddingX = 0, paddingY = 0 })
-
-v0.3.0+
-
-
paddingX: Padding x
-
paddingY: Padding y
-
Get the svg data and return an object. The detailed structure is as follows:
-
{
- svg,
- svgHTML,
- rect :
- origWidth,
- origHeight,
- scaleX,
- scaleY,
-}
-
-
render(callback)
-
-callback: v0.3.2+, Function, Called when the re-rendering is complete
-
-
Triggers a full rendering, which will reuse nodes for better performance. If
-only the node positions have changed, this method can be called to reRender.
-
reRender(callback)
-
-callback: v0.3.2+, Function, Called when the re-rendering is complete
-
-
Performs a full re-render, clearing the canvas and creating new nodes. This has
-poor performance and should be used sparingly.
-
resize()
-
After the container size has changed, this method should be called to adjust.
-
setMode(mode)
-
-v0.1.7+
-
-
Switches between readonly and edit mode.
-
mode:readonly、edit
-
on(event, fn)
-
Listen to an event. Event list:
-
-
-
-Event Name
-Description
-Callback Parameters
-
-
-
-
-data_change
-Tree rendering data change, listen to this method to get the latest data
-data (current tree rendering data)
-
-
-view_data_change(v0.1.1+)
-View change data, such as when dragging or zooming
-data (current view state data)
-
-
-back_forward
-Forward or backward
-activeHistoryIndex (current index in the history data array), length (current length of the history data array)
-
-
-draw_click
-Canvas click event
-e (event object)
-
-
-svg_mousedown
-svg canvas mouse down event
-e (event object)
-
-
-mousedown
-el element mouse down event
-e (event object), this (Event event class instance)
-
-
-mousemove
-el element mouse move event
-e (event object), this (Event event class instance)
-
-
-drag
-If it is a drag event while holding down the left button
-e (event object), this (Event event class instance)
-
-
-mouseup
-el element mouse up event
-e (event object), this (Event event class instance)
-
-
-mousewheel
-Mouse scroll event
-e (event object), dir (up or down scroll), this (Event event class instance) 、isTouchPad(v0.6.1+, Is it an event triggered by the touchpad)
-
-
-contextmenu
-svg canvas right mouse button menu event
-e (event object)
-
-
-node_click
-Node click event
-this (node instance), e (event object)
-
-
-node_mousedown
-Node mouse down event
-this (node instance), e (event object)
-
-
-node_mouseup
-node mouseup event
-this (node instance), e (event object)
-
-
-node_mouseup
-Node mouseup event
-this (node instance), e (event object)
-
-
-node_dblclick
-Node double-click event
-this (node instance), e (event object)
-
-
-node_contextmenu
-Node right-click menu event
-e (event object), this (node instance)
-
-
-node_mouseenter(v0.4.1+)
-Node mouseenter event
-this (node instance), e (event object)
-
-
-node_mouseleave(v0.4.1+)
-Node mouseleave event
-this (node instance), e (event object)
-
-
-before_node_active
-Event before node activation
-this (node instance), activeNodeList (current list of active nodes)
-
-
-node_active
-Node activation event
-this (node instance), activeNodeList (current list of active nodes)
-
-
-expand_btn_click
-Node expand or collapse event
-this (node instance)
-
-
-before_show_text_edit
-Event before node text edit box opens
-
-
-
-hide_text_edit
-Node text edit box close event
-textEditNode (text edit box DOM node), activeNodeList (current list of active nodes)
-
-
-scale
-Zoom event
-scale (zoom ratio)
-
-
-node_img_dblclick(v0.2.15+)
-Node image double-click event
-this (node instance), e (event object)
-
-
-node_img_mouseenter(v0.6.5+)
-Node image mouseenter event
-this(node instance)、imgNode(img node)、e(event object)
-
-
-node_img_mouseleave(v0.6.5+)
-Node image mouseleave event
-this(node instance)、imgNode(img node)、e(event object)
-
-
-node_img_mousemove(v0.6.5+)
-Node image mousemove event
-this(node instance)、imgNode(img node)、e(event object)
-
-
-node_tree_render_end(v0.2.16+)
-Node tree render end event
-
-
-
-rich_text_selection_change(v0.4.0+)
-Available when the RichText plugin is registered. Triggered when the text selection area changes when the node is edited
-hasRange(Whether there is a selection)、rectInfo(Size and location information of the selected area)、formatInfo(Text formatting information of the selected area)
-
-
-transforming-dom-to-images(v0.4.0+)
-Available when the RichText plugin is registered. When there is a DOM node in svg, the DOM node will be converted to an image when exporting to an image. This event will be triggered during the conversion process. You can use this event to prompt the user about the node to which you are currently converting
-index(Index of the node currently converted to)、len(Total number of nodes to be converted)
-
-
-node_dragging(v0.4.5+)
-Triggered when a node is dragged
-node(The currently dragged node)
-
-
-node_dragend(v0.4.5+)
-Triggered when the node is dragged and ends
-{ overlapNodeUid, prevNodeUid, nextNodeUid }(v0.6.12+,The node uid to which the node is moved this time, for example, if it is moved to node A, then the overlayNodeUid is the uid of node A. If it is moved to the front of node B, then the nextNodeUid is the uid of node B. You can obtain the node instance through the mindMap. extender.findNodeByUid(uid) method)
-
-
-associative_line_click(v0.4.5+)
-Triggered when an associated line is clicked
-path(Connector node)、clickPath(Invisible click line node)、node(Start node)、toNode(Target node)
-
-
-svg_mouseenter(v0.5.1+)
-Triggered when the mouse moves into the SVG canvas
-e(event object)
-
-
-svg_mouseleave(v0.5.1+)
-Triggered when the mouse moves out of the SVG canvas
-e(event object)
-
-
-node_icon_click(v0.6.10+)
-Triggered when clicking on an icon within a node
-this(node instance)、item(Click on the icon name)、e(event object)
-
-
-view_theme_change(v0.6.12+)
-Triggered after calling the setTheme method to set the theme
-theme(theme name)
-
-
-
-
emit(event, ...args)
-
Trigger an event, which can be one of the events listed above or a custom event.
-
off(event, fn)
-
Unbind an event.
-
setTheme(theme)
-
Switches the theme. Available themes can be found in the options table above.
-
getTheme()
-
Gets the current theme.
-
setThemeConfig(config)
-
Sets the theme configuration. config is the same as the themeConfig option
-in the options table above.
-
getCustomThemeConfig()
-
Gets the custom theme configuration.
-
getThemeConfig(prop)
-
Gets the value of a specific theme configuration property.
-
getConfig(prop )
-
-0.2.24+
-
-
prop:Get the value of the specified configuration, and return the entire configuration if not passed
-
Get config, That is, opt of new MindMap (opt)
-
updateConfig(opt = {})
-
-0.2.24+
-
-
opt:Configuration to update
-
Update config,That is update opt of new MindMap(opt),You can only update some data, such as:
-
mindMap.updateConfig({
- enableFreeDrag : true
-})
-
-
This method only updates the configuration and has no other side effects, such as triggering canvas re-rendering
-
getLayout()
-
Gets the current layout structure.
-
setLayout(layout)
-
Sets the layout structure. Available values can be found in the layout field
-in the options table above.
-
execCommand(name, ...args)
-
Executes a command, which will add a record to the history stack for undo or
-redo. All commands are as follows:
-
-
-
-Command name
-Description
-Parameters
-
-
-
-
-SELECT_ALL
-Select all
-
-
-
-BACK
-Go back a specified number of steps
-step (the number of steps to go back, default is 1)
-
-
-FORWARD
-Go forward a specified number of steps
-step (the number of steps to go forward, default is 1)
-
-
-INSERT_NODE
-Insert a sibling node, the active node or appoint node will be the operation node. If there are multiple active nodes, only the first one will be effective
-openEdit(v0.4.6+, Whether to activate the newly inserted node and enter editing mode, default is true) 、 appointNodes(v0.4.7+, Optional, appoint node, Specifying multiple nodes can pass an array)、 appointData(Optional, Specify the data for the newly created node, Such as {text: 'xxx', ...}, Detailed structure can be referred to exampleData.js )、 appointChildren(v0.6.14+, Optional, Specify the child nodes of the newly created node, array type)
-
-
-INSERT_CHILD_NODE
-Insert a child node, the active node or appoint node will be the operation node
-openEdit(v0.4.6+, Whether to activate the newly inserted node and enter editing mode, default is true)、 appointNodes(v0.4.7+, Optional, appoint node, Specifying multiple nodes can pass an array)、 appointData(Optional, Specify the data for the newly created node, Such as {text: 'xxx', ...}, Detailed structure can be referred to exampleData.js )、 appointChildren(v0.6.14+, Optional, Specify the child nodes of the newly created node, array type)
-
-
-UP_NODE
-Move node up, the active node will be the operation node. If there are multiple active nodes, only the first one will be effective. Using this command on the root node or the first node in the list will be invalid
-
-
-
-DOWN_NODE
-Move node down, the active node will be the operation node. If there are multiple active nodes, only the first one will be effective. Using this command on the root node or the last node in the list will be invalid
-
-
-
-REMOVE_NODE
-Remove node, the active node or appoint node will be the operation node
-appointNodes(v0.4.7+, Optional, appoint node, Specifying multiple nodes can pass an array)
-
-
-PASTE_NODE
-Paste node to a node, the active node will be the operation node
-data (the node data to paste, usually obtained through the renderer.copyNode() and renderer.cutNode() methods)
-
-
-SET_NODE_STYLE
-Modify node single style
-node (the node to set the style of), prop (style property), value (style property value), isActive (boolean, whether the style being set is for the active state)
-
-
-SET_NODE_STYLEs(v0.6.12+)
-Modify multiple styles of nodes
-node(the node to set the style of)、style(Style object,key is style prop,value is style value)、isActive(boolean, whether the style being set is for the active state)
-
-
-SET_NODE_ACTIVE
-Set whether the node is active
-node (the node to set), active (boolean, whether to activate)
-
-
-CLEAR_ACTIVE_NODE
-Clear the active state of the currently active node(s), the active node will be the operation node
-
-
-
-SET_NODE_EXPAND
-Set whether the node is expanded
-node (the node to set), expand (boolean, whether to expand)
-
-
-EXPAND_ALL
-Expand all nodes
-
-
-
-UNEXPAND_ALL
-Collapse all nodes
-
-
-
-UNEXPAND_TO_LEVEL (v0.2.8+)
-Expand to a specified level
-level (the level to expand to, 1, 2, 3...)
-
-
-SET_NODE_DATA
-Update node data, that is, update the data in the data object of the node data object
-node (the node to set), data (object, the data to update, e.g. {expand: true})
-
-
-SET_NODE_TEXT
-Set node text
-node (the node to set), text (the new text for the node), richText(v0.4.0+, If you want to set a rich text character, you need to set it to true)、resetRichText(v0.6.10+Do you want to reset rich text? The default is false. If true is passed, the style of the rich text node will be reset)
-
-
-SET_NODE_IMAGE
-Set Node Image
-node (node to set), imgData (object, image information, structured as: {url, title, width, height}, the width and height of the image must be passed)
-
-
-SET_NODE_ICON
-Set Node Icon
-node (node to set), icons (array, predefined image names array, available icons can be obtained in the nodeIconList list in the icons.js file, icon name is type_name, such as ['priority_1'])
-
-
-SET_NODE_HYPERLINK
-Set Node Hyperlink
-node (node to set), link (hyperlink address), title (hyperlink name, optional)
-
-
-SET_NODE_NOTE
-Set Node Note
-node (node to set), note (note text)
-
-
-SET_NODE_TAG
-Set Node Tag
-node (node to set), tag (string array, built-in color information can be obtained in constant.js )
-
-
-INSERT_AFTER (v0.1.5+)
-Move Node to After Another Node
-node (node to move), exist (target node)
-
-
-INSERT_BEFORE (v0.1.5+)
-Move Node to Before Another Node
-node (node to move), exist (target node)
-
-
-MOVE_NODE_TO (v0.1.5+)
-Move a node as a child of another node
-node (the node to move), toNode (the target node)
-
-
-ADD_GENERALIZATION (v0.2.0+)
-Add a node summary
-data (the data for the summary, in object format, all numerical fields of the node are supported, default is {text: 'summary'})
-
-
-REMOVE_GENERALIZATION (v0.2.0+)
-Remove a node summary
-
-
-
-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 )
-
-
-GO_TARGET_NODE(v0.6.7+)
-Navigate to a node, and if the node is collapsed, it will automatically expand to that node
-node(Node instance or node uid to locate)、callback(v0.6.9+, Callback function after positioning completion)
-
-
-
-
setData(data)
-
Dynamic setting of mind map data, pure node data
-
data: mind map structure data
-
setFullData(data )
-
-v0.2.7+
-
-
Dynamic setting of mind map data, including node data, layout, theme, view
-
data: complete data, structure can refer to
-exportFullData
-
getData(withConfig)
-
-v0.2.9+
-
-
Gets mind map data
-
withConfig: Boolean, default is false, that is, the obtained data only
-includes the node tree, if true is passed, it will also include theme, layout,
-view, etc. data
-
export(type, isDownload, fileName)
-
-You need to register the Export plugin first
-
-
Export
-
type: the type to be exported, optional values: png, svg, json, pdf (v0.2.1+),
-smm (essentially also json)
-
isDownload: whether to directly trigger download, Boolean value, default is
-false
-
fileName: (v0.1.6+) the name of the exported file, default is 思维导图 (mind
-map).
-
If it is exported as png, the fourth parameter can be passed:
-
transparent: v0.5.7+, Boolean, default is false, Specify whether the background of the exported image is transparent
-
If it is exported as svg, the fourth parameter can be passed:
-
plusCssText: Additional CSS style. If there is a dom node in svg, you can pass in some styles specific to the node through this parameter
-
If it is exported as json or smm, the fourth parameter can be passed:
-
withConfig: Boolean, default is true, Specify whether the exported data includes configuration data, otherwise only pure node tree data will be exported
-
toPos(x, y)
-
-v0.1.5+
-
-
Convert the coordinates of the browser's visible window to coordinates relative
-to the canvas.
-
addPlugin(plugin, opt)
-
-v0.4.0+
-
-
Register plugin, Use MindMap.usePlugin to register plugin only before instantiation, The registered plugin will not take effect after instantiation, So if you want to register the plugin after instantiation, you can use the addPlugin method of the instance.
-
removePlugin(plugin)
-
-v0.4.0+
-
-
Remove registered plugin, Plugins registered through the usePlugin or addPlugin methods can be removed.
-
+
diff --git a/web/src/pages/Doc/en/doExport/index.md b/web/src/pages/Doc/en/doExport/index.md
index 4a2f2c21..a3e37e12 100644
--- a/web/src/pages/Doc/en/doExport/index.md
+++ b/web/src/pages/Doc/en/doExport/index.md
@@ -38,13 +38,17 @@ a.download = 'xxx'
a.click()
```
-### png(name, transparent = false, rotateWhenWidthLongerThenHeight)
+### png(name, transparent = false, checkRotate)
+
+> Versions below v0.7.0 are: png(name, transparent = false, rotateWhenWidthLongerThenHeight)
- `name`: Name, optional
- `transparent`: v0.5.7+, Specify whether the background of the exported image is transparent
-- `rotateWhenWidthLongerThenHeight`: v0.6.15+,Boolean, false, Automatically rotate 90 degrees when the image has a width to height ratio
+- `rotateWhenWidthLongerThenHeight`: v0.6.15+, V0.7.0+abandoned, Boolean, false, Automatically rotate 90 degrees when the image has a width to height ratio
+
+- `checkRotate`: v0.7.0+, Function, You can pass a function that takes two parameters, the width and height of the image, and returns true or false. True represents that the image needs to be rotated by 90 degrees.
Exports as `png`.
diff --git a/web/src/pages/Doc/en/doExport/index.vue b/web/src/pages/Doc/en/doExport/index.vue
index ee0db902..b087ccf8 100644
--- a/web/src/pages/Doc/en/doExport/index.vue
+++ b/web/src/pages/Doc/en/doExport/index.vue
@@ -27,7 +27,10 @@ a.href = 'xxx.png' 'xxx'
a.click()
-png(name, transparent = false, rotateWhenWidthLongerThenHeight)
+png(name, transparent = false, checkRotate)
+
+Versions below v0.7.0 are: png(name, transparent = false, rotateWhenWidthLongerThenHeight)
+
name: Name, optional
@@ -36,7 +39,10 @@ a.click()
transparent: v0.5.7+, Specify whether the background of the exported image is transparent
-rotateWhenWidthLongerThenHeight: v0.6.15+,Boolean, false, Automatically rotate 90 degrees when the image has a width to height ratio
+rotateWhenWidthLongerThenHeight: v0.6.15+, V0.7.0+abandoned, Boolean, false, Automatically rotate 90 degrees when the image has a width to height ratio
+
+
+checkRotate: v0.7.0+, Function, You can pass a function that takes two parameters, the width and height of the image, and returns true or false. True represents that the image needs to be rotated by 90 degrees.
Exports as png.
diff --git a/web/src/pages/Doc/en/introduction/index.md b/web/src/pages/Doc/en/introduction/index.md
index 47970b2b..1f856d9e 100644
--- a/web/src/pages/Doc/en/introduction/index.md
+++ b/web/src/pages/Doc/en/introduction/index.md
@@ -188,4 +188,8 @@ Open source is not easy. If this project is helpful to you, you can invite the a
布林
+
+
+
南风
+
\ No newline at end of file
diff --git a/web/src/pages/Doc/en/introduction/index.vue b/web/src/pages/Doc/en/introduction/index.vue
index 5e6e21e2..dc31cb3f 100644
--- a/web/src/pages/Doc/en/introduction/index.vue
+++ b/web/src/pages/Doc/en/introduction/index.vue
@@ -147,6 +147,10 @@ full screen, support mini map
布林
+
+
+
南风
+
diff --git a/web/src/pages/Doc/en/node/index.md b/web/src/pages/Doc/en/node/index.md
index 74d54d3a..60bd459e 100644
--- a/web/src/pages/Doc/en/node/index.md
+++ b/web/src/pages/Doc/en/node/index.md
@@ -110,17 +110,21 @@ Get the final style value applied to this node
`root`: whether it is the root node, default `false`
-`isActive`: whether the value being fetched is the active state style value,
+`isActive`: v0.7.0+has been abandoned, whether the value being fetched is the active state style value,
default `false`
### setStyle(prop, value, isActive)
+- `isActive`: v0.7.0+has been abandoned
+
Modify a style of the node, a shortcut method for the `SET_NODE_STYLE` command
### setStyles(style, isActive)
> v0.6.12+
+- `isActive`: v0.7.0+has been abandoned
+
Modify multiple styles of nodes, a shortcut method for the `SET_NODE_STYLES` command
### getData(key)
diff --git a/web/src/pages/Doc/en/node/index.vue b/web/src/pages/Doc/en/node/index.vue
index eb479570..fc5f1ed9 100644
--- a/web/src/pages/Doc/en/node/index.vue
+++ b/web/src/pages/Doc/en/node/index.vue
@@ -64,14 +64,20 @@
Get the final style value applied to this node
prop: the style property to get
root: whether it is the root node, default false
-isActive: whether the value being fetched is the active state style value,
+
isActive: v0.7.0+has been abandoned, whether the value being fetched is the active state style value,
default false
setStyle(prop, value, isActive)
+
+isActive: v0.7.0+has been abandoned
+
Modify a style of the node, a shortcut method for the SET_NODE_STYLE command
setStyles(style, isActive)
v0.6.12+
+
+isActive: v0.7.0+has been abandoned
+
Modify multiple styles of nodes, a shortcut method for the SET_NODE_STYLES command
getData(key)
Get the specified value in the data object of the node's real data nodeData,
diff --git a/web/src/pages/Doc/en/scrollbar/index.md b/web/src/pages/Doc/en/scrollbar/index.md
new file mode 100644
index 00000000..10974f51
--- /dev/null
+++ b/web/src/pages/Doc/en/scrollbar/index.md
@@ -0,0 +1,64 @@
+# Scrollbar plugin
+
+> v0.7.0+
+
+This plugin is used to help develop the functionality of horizontal and vertical scrollbar.
+
+## Register
+
+```js
+import MindMap from 'simple-mind-map'
+import Scrollbar from 'simple-mind-map/src/plugins/Scrollbar.js'
+MindMap.usePlugin(Scrollbar)
+```
+
+After registration and instantiation of `MindMap`, the instance can be obtained through `mindMap.scrollbar`.
+
+## Event
+
+#### scrollbar_change
+
+Triggered when the scrollbar data changes, you can listen to this event to update the position and size of the scrollbar.
+
+## Method
+
+### setScrollBarWrapSize(width, height)
+
+- `width`: Number, The width of your scrollbar container element.
+
+- `height`: Number, The height of your scrollbar container element.
+
+Set the size of the scroll bar container, which is the width of the container for horizontal scrollbars and the height of the container for vertical scrollbars. When your scrollbar container size changes, you need to call this method again.
+
+### calculationScrollbar()
+
+> You need to first call the setScrollBarWrapSize method to set the width and height of the scroll bar container element.
+>
+> Generally, it is necessary to monitor scrollbar_change event, and then call it to update the scroll bar.
+
+Return value:
+
+```js
+{
+ // Vertical scrollbar
+ vertical: {
+ top,
+ height
+ },
+ // Horizontal scrollbar
+ horizontal: {
+ left,
+ width
+ }
+}
+```
+
+Obtain the size and position of the scroll bar, and you can set it to the scroll bar element based on the return value to achieve the effect of rendering and caring about the scroll bar.
+
+### onMousedown(e, type)
+
+- `e`: The event object for the mouse down event.
+
+- `type`: The type of scroll bar pressed, vertical(Vertical scrollbar)、horizontal(Horizontal scrollbar)。
+
+This method needs to be called when the mouse press event of the scrollbar element occurs.
\ No newline at end of file
diff --git a/web/src/pages/Doc/en/scrollbar/index.vue b/web/src/pages/Doc/en/scrollbar/index.vue
new file mode 100644
index 00000000..d5851f33
--- /dev/null
+++ b/web/src/pages/Doc/en/scrollbar/index.vue
@@ -0,0 +1,70 @@
+
+
+
Scrollbar plugin
+
+v0.7.0+
+
+
This plugin is used to help develop the functionality of horizontal and vertical scrollbar.
+
Register
+
import MindMap from 'simple-mind-map'
+import Scrollbar from 'simple-mind-map/src/plugins/Scrollbar.js'
+MindMap.usePlugin(Scrollbar)
+
+
After registration and instantiation of MindMap, the instance can be obtained through mindMap.scrollbar.
+
Event
+
scrollbar_change
+
Triggered when the scrollbar data changes, you can listen to this event to update the position and size of the scrollbar.
+
Method
+
setScrollBarWrapSize(width, height)
+
+
+width: Number, The width of your scrollbar container element.
+
+
+height: Number, The height of your scrollbar container element.
+
+
+
Set the size of the scroll bar container, which is the width of the container for horizontal scrollbars and the height of the container for vertical scrollbars. When your scrollbar container size changes, you need to call this method again.
+
calculationScrollbar()
+
+You need to first call the setScrollBarWrapSize method to set the width and height of the scroll bar container element.
+Generally, it is necessary to monitor scrollbar_change event, and then call it to update the scroll bar.
+
+
Return value:
+
{
+
+ vertical : {
+ top,
+ height
+ },
+
+ horizontal : {
+ left,
+ width
+ }
+}
+
+
Obtain the size and position of the scroll bar, and you can set it to the scroll bar element based on the return value to achieve the effect of rendering and caring about the scroll bar.
+
onMousedown(e, type)
+
+
+e: The event object for the mouse down event.
+
+
+type: The type of scroll bar pressed, vertical(Vertical scrollbar)、horizontal(Horizontal scrollbar)。
+
+
+
This method needs to be called when the mouse press event of the scrollbar element occurs.
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/web/src/pages/Doc/en/search/index.md b/web/src/pages/Doc/en/search/index.md
index 215917f6..8ba3235b 100644
--- a/web/src/pages/Doc/en/search/index.md
+++ b/web/src/pages/Doc/en/search/index.md
@@ -12,7 +12,7 @@ import Search from 'simple-mind-map/src/plugins/Search.js'
MindMap.usePlugin(Search)
```
-After registration and instantiation of `MindMap`, the instance can be obtained through `mindMap.Search`.
+After registration and instantiation of `MindMap`, the instance can be obtained through `mindMap.search`.
## Event
diff --git a/web/src/pages/Doc/en/search/index.vue b/web/src/pages/Doc/en/search/index.vue
index c47b9d40..26f7d4e9 100644
--- a/web/src/pages/Doc/en/search/index.vue
+++ b/web/src/pages/Doc/en/search/index.vue
@@ -10,7 +10,7 @@
import Search from 'simple-mind-map/src/plugins/Search.js'
MindMap.usePlugin(Search)
-
After registration and instantiation of MindMap, the instance can be obtained through mindMap.Search.
+After registration and instantiation of MindMap, the instance can be obtained through mindMap.search.
Event
search_info_change
You can listen to 'search_info_change' event to get the number of current search results and the index currently located.
diff --git a/web/src/pages/Doc/routerList.js b/web/src/pages/Doc/routerList.js
index 578b9aa2..88f8964b 100644
--- a/web/src/pages/Doc/routerList.js
+++ b/web/src/pages/Doc/routerList.js
@@ -29,6 +29,8 @@ export default [
{ path: 'course20', title: '如何自定义节点内容' },
{ path: 'course21', title: '如何复制、剪切、粘贴' },
{ path: 'course22', title: '如何实现搜索、替换' },
+ { path: 'course23', title: '如何渲染滚动条' },
+ { path: 'course24', title: '如何开发一个插件' },
{ path: 'doExport', title: 'Export 插件' },
{ path: 'drag', title: 'Drag插件' },
{ path: 'introduction', title: '简介' },
@@ -52,7 +54,8 @@ export default [
{ path: 'nodeImgAdjust', title: 'NodeImgAdjust插件' },
{ path: 'search', title: 'Search插件' },
{ path: 'painter', title: 'Painter插件' },
- { path: 'help1', title: '概要/关联线' },
+ { path: 'painter', title: 'Painter插件' },
+ { path: 'scrollbar', title: 'Scrollbar插件' },
{ path: 'help2', title: '客户端' }
]
},
@@ -85,7 +88,8 @@ export default [
{ path: 'touchEvent', title: 'TouchEvent plugin' },
{ path: 'nodeImgAdjust', title: 'NodeImgAdjust plugin' },
{ path: 'search', title: 'Search plugin' },
- { path: 'painter', title: 'Painter plugin' }
+ { path: 'painter', title: 'Painter plugin' },
+ { path: 'scrollbar', title: 'Scrollbar plugin' }
]
}
]
diff --git a/web/src/pages/Doc/zh/changelog/index.md b/web/src/pages/Doc/zh/changelog/index.md
index 213a6609..32722852 100644
--- a/web/src/pages/Doc/zh/changelog/index.md
+++ b/web/src/pages/Doc/zh/changelog/index.md
@@ -1,5 +1,55 @@
# Changelog
+## 0.7.0
+
+破坏性更新:删除了主题文件中节点激活样式的部分,不再支持设置节点的激活样式,激活效果改为统一的节点外边框样式,同时支持鼠标hover效果。
+
+修复:
+
+> 1.修复节点边框尺寸比较大的情况下的的渲染异常问题。
+>
+> 2.修复切换主题时存在关联线的节点样式不会更新的问题。
+>
+> 3.修复全选没有触发node_active事件的问题。
+
+新增:
+
+> 1.收起节点时,显示折叠的节点数量。
+>
+> 2.支持关联线端点的位置跟随鼠标拖拽变化。
+>
+> 3.新增滚动条插件。
+>
+> 4.支持在url中通过fileURL查询参数打开指定的在线文件。
+>
+> 5.鱼骨图支持设置节点margin。
+>
+> 6.默认关闭双击复位画布。
+>
+> 7.修改导出图片方法的参数,导出pdf时如果思维导图尺寸小于a4纸那么不旋转方向。
+>
+> 8.提升导出的图片和pdf在高清屏的清晰度。
+>
+> 9.插件新增销毁前生命周期函数,解决销毁思维导图时插件的一些副作用没有清除的问题。
+>
+> 10.优化基础样式的设置,修改不影响大小的主题属性时不触发全量渲染。
+>
+> 11.右键多选节点结束时禁止触发节点右键菜单事件,避免触发右键菜单显示。
+>
+> 12.优化Select插件,如果多选节点没有变化,那么不触发激活激活事件。
+>
+> 13.node_active事件抛出的激活节点列表不再直接引用内部激活列表。
+>
+> 14.优化鼠标按下节点事件逻辑,在右键拖拽画布模式下支持右键按住根节点拖拽画布。
+
+Demo:
+
+> 1.不直接引用内部激活节点列表,优化性能。
+>
+> 2.支持配置是否显示滚动条。
+>
+> 3.删除侧边栏节点样式配置部分的激活节点配置。
+
## 0.6.17
修复:
diff --git a/web/src/pages/Doc/zh/changelog/index.vue b/web/src/pages/Doc/zh/changelog/index.vue
index a98e89cd..73cfeb0f 100644
--- a/web/src/pages/Doc/zh/changelog/index.vue
+++ b/web/src/pages/Doc/zh/changelog/index.vue
@@ -1,6 +1,37 @@
Changelog
+
0.7.0
+
破坏性更新:删除了主题文件中节点激活样式的部分,不再支持设置节点的激活样式,激活效果改为统一的节点外边框样式,同时支持鼠标hover效果。
+
修复:
+
+1.修复节点边框尺寸比较大的情况下的的渲染异常问题。
+2.修复切换主题时存在关联线的节点样式不会更新的问题。
+3.修复全选没有触发node_active事件的问题。
+
+
新增:
+
+1.收起节点时,显示折叠的节点数量。
+2.支持关联线端点的位置跟随鼠标拖拽变化。
+3.新增滚动条插件。
+4.支持在url中通过fileURL查询参数打开指定的在线文件。
+5.鱼骨图支持设置节点margin。
+6.默认关闭双击复位画布。
+7.修改导出图片方法的参数,导出pdf时如果思维导图尺寸小于a4纸那么不旋转方向。
+8.提升导出的图片和pdf在高清屏的清晰度。
+9.插件新增销毁前生命周期函数,解决销毁思维导图时插件的一些副作用没有清除的问题。
+10.优化基础样式的设置,修改不影响大小的主题属性时不触发全量渲染。
+11.右键多选节点结束时禁止触发节点右键菜单事件,避免触发右键菜单显示。
+12.优化Select插件,如果多选节点没有变化,那么不触发激活激活事件。
+13.node_active事件抛出的激活节点列表不再直接引用内部激活列表。
+14.优化鼠标按下节点事件逻辑,在右键拖拽画布模式下支持右键按住根节点拖拽画布。
+
+
Demo:
+
+1.不直接引用内部激活节点列表,优化性能。
+2.支持配置是否显示滚动条。
+3.删除侧边栏节点样式配置部分的激活节点配置。
+
0.6.17
修复:
diff --git a/web/src/pages/Doc/zh/constructor/index.md b/web/src/pages/Doc/zh/constructor/index.md
index 177545f9..25bf7083 100644
--- a/web/src/pages/Doc/zh/constructor/index.md
+++ b/web/src/pages/Doc/zh/constructor/index.md
@@ -48,8 +48,10 @@ const mindMap = new MindMap({
| mousewheelZoomActionReverse(v0.6.5+) | Boolean | false | 当mousewheelAction设为zoom时,默认向前滚动是缩小,向后滚动是放大,如果该属性设为true,那么会反过来 | |
| defaultInsertSecondLevelNodeText(v0.4.7+) | String | 二级节点 | 默认插入的二级节点的文字 | |
| defaultInsertBelowSecondLevelNodeText(v0.4.7+) | String | 分支主题 | 默认插入的二级以下节点的文字 | |
-| expandBtnStyle(v0.5.0+) | Object | { color: '#808080', fill: '#fff' } | 展开收起按钮的颜色 | |
+| expandBtnStyle(v0.5.0+) | Object | { color: '#808080', fill: '#fff', fontSize: 13, strokeColor: '#333333' } | 展开收起按钮的颜色,(fontSize及strokeColor字段为0.7.0+版本新增的,用于设置收起时显示节点数量的文字样式) | |
| expandBtnIcon(v0.5.0+) | Object | { open: '', close: '' } | 自定义展开收起按钮的图标,可以传图标的svg字符串 | |
+| expandBtnNumHandler(v0.7.0+) | Function | | 用于自定义收起时显示节点数量的内容,接收一个参数,代表收起的节点实例,需要返回一个数字或字符串,代表最终显示的内容,比如你可以当数量大于99时,显示99+ | |
+| isShowExpandNum(v0.7.0+) | Boolean | true | 节点收起时是否显示收起的数量 | |
| enableShortcutOnlyWhenMouseInSvg(v0.5.1+) | Boolean | true | 是否只有当鼠标在画布内才响应快捷键事件 | |
| enableNodeTransitionMove(v0.5.1+)(v0.6.7+已去除该特性) | Boolean | true | 是否开启节点动画过渡 | |
| nodeTransitionMoveDuration(v0.5.1+)(v0.6.7+已去除该特性) | Number | 300 | 如果开启节点动画过渡,可以通过该属性设置过渡的时间,单位ms | |
@@ -80,7 +82,11 @@ const mindMap = new MindMap({
| errorHandler(v0.6.15+) | Function | | 自定义错误处理函数,目前只会抛出一些异步逻辑出错的情况。可以传递一个函数,会接收两个参数,第一个为错误的类型,第二个为错误对象 | |
| disableMouseWheelZoom(v0.6.15+) | Boolean | false | 禁止鼠标滚轮缩放,你仍旧可以使用api进行缩放 | |
| resetCss(v0.6.16+) | String | * { margin: 0; padding: 0; box-sizing: border-box; } | 设置导出图片和svg时,针对富文本节点内容,也就是嵌入到svg中的html节点的默认样式覆盖,如果不覆盖,节点内容会发生偏移 | |
-| enableDblclickReset(v0.6.17+) | Boolean | true | 开启鼠标双击复位思维导图位置及缩放 | |
+| enableDblclickReset(v0.6.17+) | Boolean | true(v0.7.0+改为false) | 开启鼠标双击复位思维导图位置及缩放 | |
+| minExportImgCanvasScale(v0.7.0+) | Number | 2 | 导出图片和pdf时canvas的缩放倍数,该配置会和window.devicePixelRatio值取最大值,用于提升图片清晰度 | |
+| hoverRectColor(v0.7.0+) | String | rgb(94, 200, 248) | 节点鼠标hover和激活时显示的矩形边框颜色,hover时会添加0.6的透明度 | |
+| hoverRectPadding(v0.7.0+) | Number | 2 | 节点鼠标hover和激活时显示的矩形边框距节点内容的距离 | |
+| selectTextOnEnterEditText(v0.7.0+) | Boolean | true | 双击节点进入节点文本编辑时是否默认选中文本,默认只在创建新节点时会选中 | |
### 水印配置
@@ -330,8 +336,8 @@ mindMap.updateConfig({
| REMOVE_NODE | 删除节点,操作节点为当前激活的节点或指定节点 | appointNodes(v0.4.7+,可选,指定节点,指定多个节点可以传一个数组) |
| PASTE_NODE | 粘贴节点到节点,操作节点为当前激活的节点 | data(要粘贴的节点数据,一般通过`renderer.copyNode()`方法和`renderer.cutNode()`方法获取) |
| CUT_NODE | 剪切节点,操作节点为当前激活的节点,如果有多个激活节点,只会对第一个有效,对根节点使用无效 | callback(回调函数,剪切的节点数据会通过调用该函数并通过参数返回) |
-| SET_NODE_STYLE | 修改节点单个样式 | node(要设置样式的节点)、style(样式属性)、value(样式属性值)、isActive(布尔值,是否设置的是激活状态的样式) |
-| SET_NODE_STYLEs(v0.6.12+) | 修改节点多个样式 | node(要设置样式的节点)、style(样式对象,key为样式属性,value为样式值)、isActive(布尔值,是否设置的是激活状态的样式) |
+| SET_NODE_STYLE | 修改节点单个样式 | node(要设置样式的节点)、style(样式属性)、value(样式属性值)、isActive(v0.7.0+已废弃,布尔值,是否设置的是激活状态的样式) |
+| SET_NODE_STYLEs(v0.6.12+) | 修改节点多个样式 | node(要设置样式的节点)、style(样式对象,key为样式属性,value为样式值)、isActive(v0.7.0+已废弃,布尔值,是否设置的是激活状态的样式) |
| SET_NODE_ACTIVE | 设置节点是否激活 | node(要设置的节点)、active(布尔值,是否激活) |
| CLEAR_ACTIVE_NODE | 清除当前已激活节点的激活状态,操作节点为当前激活的节点 | |
| SET_NODE_EXPAND | 设置节点是否展开 | node(要设置的节点)、expand(布尔值,是否展开) |
diff --git a/web/src/pages/Doc/zh/constructor/index.vue b/web/src/pages/Doc/zh/constructor/index.vue
index 675b575e..6e34e391 100644
--- a/web/src/pages/Doc/zh/constructor/index.vue
+++ b/web/src/pages/Doc/zh/constructor/index.vue
@@ -199,8 +199,8 @@
expandBtnStyle(v0.5.0+)
Object
-{ color: '#808080', fill: '#fff' }
-展开收起按钮的颜色
+{ color: '#808080', fill: '#fff', fontSize: 13, strokeColor: '#333333' }
+展开收起按钮的颜色,(fontSize及strokeColor字段为0.7.0+版本新增的,用于设置收起时显示节点数量的文字样式)
@@ -211,6 +211,20 @@
+expandBtnNumHandler(v0.7.0+)
+Function
+
+用于自定义收起时显示节点数量的内容,接收一个参数,代表收起的节点实例,需要返回一个数字或字符串,代表最终显示的内容,比如你可以当数量大于99时,显示99+
+
+
+
+isShowExpandNum(v0.7.0+)
+Boolean
+true
+节点收起时是否显示收起的数量
+
+
+
enableShortcutOnlyWhenMouseInSvg(v0.5.1+)
Boolean
true
@@ -423,10 +437,38 @@
enableDblclickReset(v0.6.17+)
Boolean
-true
+true(v0.7.0+改为false)
开启鼠标双击复位思维导图位置及缩放
+
+minExportImgCanvasScale(v0.7.0+)
+Number
+2
+导出图片和pdf时canvas的缩放倍数,该配置会和window.devicePixelRatio值取最大值,用于提升图片清晰度
+
+
+
+hoverRectColor(v0.7.0+)
+String
+rgb(94, 200, 248)
+节点鼠标hover和激活时显示的矩形边框颜色,hover时会添加0.6的透明度
+
+
+
+hoverRectPadding(v0.7.0+)
+Number
+2
+节点鼠标hover和激活时显示的矩形边框距节点内容的距离
+
+
+
+selectTextOnEnterEditText(v0.7.0+)
+Boolean
+true
+双击节点进入节点文本编辑时是否默认选中文本,默认只在创建新节点时会选中
+
+
水印配置
@@ -888,12 +930,12 @@ mindMap.setTheme('主题名称' )
SET_NODE_STYLE
修改节点单个样式
-node(要设置样式的节点)、style(样式属性)、value(样式属性值)、isActive(布尔值,是否设置的是激活状态的样式)
+node(要设置样式的节点)、style(样式属性)、value(样式属性值)、isActive(v0.7.0+已废弃,布尔值,是否设置的是激活状态的样式)
SET_NODE_STYLEs(v0.6.12+)
修改节点多个样式
-node(要设置样式的节点)、style(样式对象,key为样式属性,value为样式值)、isActive(布尔值,是否设置的是激活状态的样式)
+node(要设置样式的节点)、style(样式对象,key为样式属性,value为样式值)、isActive(v0.7.0+已废弃,布尔值,是否设置的是激活状态的样式)
SET_NODE_ACTIVE
diff --git a/web/src/pages/Doc/zh/course23/index.md b/web/src/pages/Doc/zh/course23/index.md
new file mode 100644
index 00000000..ca16355c
--- /dev/null
+++ b/web/src/pages/Doc/zh/course23/index.md
@@ -0,0 +1,116 @@
+# 如何渲染滚动条
+
+> 需要先注册 Scrollbar 插件
+
+滚动条分为水平和垂直滚动条,所以你需要创建如下模板:
+
+```html
+
+
+
+
+
+```
+
+外层元素为滚动条容器元素,内层为滚动条元素。
+
+内层滚动条元素一般需要设置成绝对定位,样式示例如下:
+
+```css
+.scrollbar {
+ position: relative;
+ background-color: #f5f5f5;
+ border-radius: 10px;
+ overflow: hidden;
+
+ &.verticalScrollbar {
+ width: 10px;
+ height: 500px;
+
+ .scrollbarInner {
+ width: 10px;
+ left: 0;
+ }
+ }
+
+ &.horizontalScrollbar {
+ width: 500px;
+ height: 10px;
+
+ .scrollbarInner {
+ height: 10px;
+ top: 0;
+ }
+ }
+
+ .scrollbarInner {
+ position: absolute;
+ background-color: #ccc;
+ border-radius: 10px;
+ }
+}
+```
+
+垂直滚动条的`top`和`height`、水平滚动条的`left`和`width`值需要调用插件的方法获取。
+
+首先你需要调用`setScrollBarWrapSize`方法传递你的滚动条容器的宽和高:
+
+```js
+// 水平滚动条容器的宽度
+const { width } = this.$refs.horizontalScrollbarRef.getBoundingClientRect()
+// 垂直滚动条容器的高度
+const { height } = this.$refs.verticalScrollbarRef.getBoundingClientRect()
+mindMap.scrollbar.setScrollBarWrapSize(width, height)
+```
+
+如果容器大小发生了改变需要再次调用该方法传递改变后的大小。
+
+然后你需要监听`scrollbar_change`方法来获取滚动条大小和位置数据:
+
+```js
+mindMap.('scrollbar_change', this.updateScrollbar)
+
+// 调用插件方法更新滚动条位置和大小
+{
+ updateScrollbar() {
+ const {
+ vertical,
+ horizontal
+ } = mindMap.scrollbar.calculationScrollbar()
+ this.verticalScrollbarStyle = {
+ top: vertical.top + '%',
+ height: vertical.height + '%'
+ }
+ this.horizontalScrollbarStyle = {
+ left: horizontal.left + '%',
+ width: horizontal.width + '%'
+ }
+ }
+}
+```
+
+调用插件的`calculationScrollbar`方法来获取滚动条元素的位置和大小,返回的是百分比数值,所以需要添加`%`。
+
+最后,需要给滚动条元素绑定`mousedown`事件,并且调用插件的`onMousedown`方法:
+
+```js
+// 垂直滚动条元素
+mindMap.scrollbar.onMousedown(e, 'vertical')
+
+// 水平滚动条元素
+mindMap.scrollbar.onMousedown(e, 'horizontal')
+```
+
+以上就是实现滚动条渲染的全部步骤。
\ No newline at end of file
diff --git a/web/src/pages/Doc/zh/course23/index.vue b/web/src/pages/Doc/zh/course23/index.vue
new file mode 100644
index 00000000..f2839237
--- /dev/null
+++ b/web/src/pages/Doc/zh/course23/index.vue
@@ -0,0 +1,112 @@
+
+
+
如何渲染滚动条
+
+需要先注册 Scrollbar 插件
+
+
滚动条分为水平和垂直滚动条,所以你需要创建如下模板:
+
+<div class ="scrollbar verticalScrollbar" ref ="verticalScrollbarRef" >
+ <div
+ class ="scrollbarInner"
+ :style ="verticalScrollbarStyle"
+ @mousedown ="onVerticalScrollbarMousedown"
+ > </div >
+</div >
+
+
+<div class ="scrollbar horizontalScrollbar" ref ="horizontalScrollbarRef" >
+ <div
+ class ="scrollbarInner"
+ :style ="horizontalScrollbarStyle"
+ @mousedown ="onHorizontalScrollbarMousedown"
+ > </div >
+</div >
+
+
外层元素为滚动条容器元素,内层为滚动条元素。
+
内层滚动条元素一般需要设置成绝对定位,样式示例如下:
+
.scrollbar {
+ position : relative;
+ background-color : #f5f5f5 ;
+ border-radius : 10px ;
+ overflow : hidden;
+
+ &.verticalScrollbar {
+ width : 10px ;
+ height : 500px ;
+
+ .scrollbarInner {
+ width : 10px ;
+ left : 0 ;
+ }
+ }
+
+ &.horizontalScrollbar {
+ width : 500px ;
+ height : 10px ;
+
+ .scrollbarInner {
+ height : 10px ;
+ top : 0 ;
+ }
+ }
+
+ .scrollbarInner {
+ position : absolute;
+ background-color : #ccc ;
+ border-radius : 10px ;
+ }
+}
+
+
垂直滚动条的top和height、水平滚动条的left和width值需要调用插件的方法获取。
+
首先你需要调用setScrollBarWrapSize方法传递你的滚动条容器的宽和高:
+
+const { width } = this .$refs.horizontalScrollbarRef.getBoundingClientRect()
+
+const { height } = this .$refs.verticalScrollbarRef.getBoundingClientRect()
+mindMap.scrollbar.setScrollBarWrapSize(width, height)
+
+
如果容器大小发生了改变需要再次调用该方法传递改变后的大小。
+
然后你需要监听scrollbar_change方法来获取滚动条大小和位置数据:
+
mindMap.('scrollbar_change' , this .updateScrollbar)
+
+
+{
+ updateScrollbar ( ) {
+ const {
+ vertical,
+ horizontal
+ } = mindMap.scrollbar.calculationScrollbar()
+ this .verticalScrollbarStyle = {
+ top : vertical.top + '%' ,
+ height : vertical.height + '%'
+ }
+ this .horizontalScrollbarStyle = {
+ left : horizontal.left + '%' ,
+ width : horizontal.width + '%'
+ }
+ }
+}
+
+
调用插件的calculationScrollbar方法来获取滚动条元素的位置和大小,返回的是百分比数值,所以需要添加%。
+
最后,需要给滚动条元素绑定mousedown事件,并且调用插件的onMousedown方法:
+
+mindMap.scrollbar.onMousedown(e, 'vertical' )
+
+
+mindMap.scrollbar.onMousedown(e, 'horizontal' )
+
+
以上就是实现滚动条渲染的全部步骤。
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/web/src/pages/Doc/zh/course24/index.md b/web/src/pages/Doc/zh/course24/index.md
new file mode 100644
index 00000000..414b6465
--- /dev/null
+++ b/web/src/pages/Doc/zh/course24/index.md
@@ -0,0 +1,65 @@
+# 如何开发一个插件
+
+库本身提供了一些插件,如果满足不了你的需求,你也可以自己开发一个新插件。
+
+想要开发一个插件,你肯定需要对库的实现原理、模块划分、目录结构等等有一定了解,简而言之,需要你对库的源码有一定程度的熟悉,所以如果还没看过,现在就可以先去阅读一下,好消息是,本库的源码并不复杂,相信你一定能看懂。
+
+在你决定动手之前,最好先看一下内部插件是如何实现的。
+
+一个插件就是一个类:
+
+```js
+class YourPlugin {
+ constructor({ mindMap }) {
+ this.mindMap = mindMap
+ }
+
+ // 插件被移除前做的事情
+ beforePluginRemove() {
+
+ }
+
+ // 插件被卸载前做的事情
+ beforePluginDestroy() {
+
+ }
+}
+
+Scrollbar.instanceName = 'yourPlugin'
+```
+
+实例化插件时会传入思维导图实例,你可以保存起来,后续可以通过它来监听方法或调用实例的方法,甚至是其他插件的方法。
+
+需要给插件类添加一个静态属性`instanceName`,会将你的插件实例通过该属性保存到思维导图实例上,外部或其他插件想要获取你的插件实例时都需要通过该属性:
+
+```js
+mindMap.yourPlugin.xxx
+```
+
+插件存在两个生命周期函数:
+
+`beforePluginRemove`生命周期会在思维导图实例调用`removePlugin`方法时调用,代表思维导图实例并没有销毁,只是移除该插件。
+
+`beforePluginDestroy`生命周期会在销毁思维导图时调用,此时思维导图实例也会被销毁。
+
+```js
+mindMap.removePlugin(YourPlugin)
+```
+
+你也可以继承内部的一些插件:
+
+```js
+import ScrollbarPlugin from 'simple-mind-map/src/plugins/Scrollbar.js'
+
+class YourPlugin extends ScrollbarPlugin {
+ constructor(opt) {
+ super(opt)
+ }
+}
+
+Scrollbar.instanceName = 'yourPlugin'
+```
+
+插件的原理无非是监听一些你需要的事件,然后调用一些你需要的方法来完成一些功能,其实没啥好多说的,建议看一下内部插件的实现。
+
+当你完成了一个插件后,你可以考虑发布到`npm`,提供给其他开发者使用。
\ No newline at end of file
diff --git a/web/src/pages/Doc/zh/course24/index.vue b/web/src/pages/Doc/zh/course24/index.vue
new file mode 100644
index 00000000..fc72aea2
--- /dev/null
+++ b/web/src/pages/Doc/zh/course24/index.vue
@@ -0,0 +1,60 @@
+
+
+
如何开发一个插件
+
库本身提供了一些插件,如果满足不了你的需求,你也可以自己开发一个新插件。
+
想要开发一个插件,你肯定需要对库的实现原理、模块划分、目录结构等等有一定了解,简而言之,需要你对库的源码有一定程度的熟悉,所以如果还没看过,现在就可以先去阅读一下,好消息是,本库的源码并不复杂,相信你一定能看懂。
+
在你决定动手之前,最好先看一下内部插件是如何实现的。
+
一个插件就是一个类:
+
class YourPlugin {
+ constructor ({ mindMap } ) {
+ this .mindMap = mindMap
+ }
+
+
+ beforePluginRemove ( ) {
+
+ }
+
+
+ beforePluginDestroy ( ) {
+
+ }
+}
+
+Scrollbar.instanceName = 'yourPlugin'
+
+
实例化插件时会传入思维导图实例,你可以保存起来,后续可以通过它来监听方法或调用实例的方法,甚至是其他插件的方法。
+
需要给插件类添加一个静态属性instanceName,会将你的插件实例通过该属性保存到思维导图实例上,外部或其他插件想要获取你的插件实例时都需要通过该属性:
+
mindMap.yourPlugin.xxx
+
+
插件存在两个生命周期函数:
+
beforePluginRemove生命周期会在思维导图实例调用removePlugin方法时调用,代表思维导图实例并没有销毁,只是移除该插件。
+
beforePluginDestroy生命周期会在销毁思维导图时调用,此时思维导图实例也会被销毁。
+
mindMap.removePlugin(YourPlugin)
+
+
你也可以继承内部的一些插件:
+
import ScrollbarPlugin from 'simple-mind-map/src/plugins/Scrollbar.js'
+
+class YourPlugin extends ScrollbarPlugin {
+ constructor (opt ) {
+ super (opt)
+ }
+}
+
+Scrollbar.instanceName = 'yourPlugin'
+
+
插件的原理无非是监听一些你需要的事件,然后调用一些你需要的方法来完成一些功能,其实没啥好多说的,建议看一下内部插件的实现。
+
当你完成了一个插件后,你可以考虑发布到npm,提供给其他开发者使用。
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/web/src/pages/Doc/zh/course3/index.md b/web/src/pages/Doc/zh/course3/index.md
index 60b214d2..2a662381 100644
--- a/web/src/pages/Doc/zh/course3/index.md
+++ b/web/src/pages/Doc/zh/course3/index.md
@@ -14,6 +14,28 @@ mindMap.execCommand('INSERT_CHILD_NODE')
`INSERT_CHILD_NODE`命令还支持传入几个参数,详细详细请阅读【API】-【构造函数】-【execCommand方法】。
+如果你想获取插入节点的实例,可以这样操作:
+
+1.需要指定新插入节点的`id`,比如:
+
+```js
+import { createUid } from 'simple-mind-map/src/utils'
+
+let uid = createUid()
+mindMap.execCommand('INSERT_CHILD_NODE', false, [], {
+ uid
+})
+```
+
+2.然后在`node_tree_render_end`事件里通过该`id`来获取实例:
+
+```js
+mindMap.on('node_tree_render_end', () => {
+ // 调用renderer实例的findNodeByUid方法获取到节点的实例对象
+ const node = mindMap.renderer.findNodeByUid(uid)
+})
+```
+
## 插入兄弟节点
插入兄弟节点和插入子节点方式完全一致:
diff --git a/web/src/pages/Doc/zh/course3/index.vue b/web/src/pages/Doc/zh/course3/index.vue
index b502c9cf..d2e3d874 100644
--- a/web/src/pages/Doc/zh/course3/index.vue
+++ b/web/src/pages/Doc/zh/course3/index.vue
@@ -8,6 +8,21 @@
这样就会在当前激活节点(如果存在多个激活节点,默认会操作第一个激活节点)下添加一个子节点。
INSERT_CHILD_NODE命令还支持传入几个参数,详细详细请阅读【API】-【构造函数】-【execCommand方法】。
+如果你想获取插入节点的实例,可以这样操作:
+1.需要指定新插入节点的id,比如:
+import { createUid } from 'simple-mind-map/src/utils'
+
+let uid = createUid()
+mindMap.execCommand('INSERT_CHILD_NODE' , false , [], {
+ uid
+})
+
+2.然后在node_tree_render_end事件里通过该id来获取实例:
+mindMap.on('node_tree_render_end' , () => {
+
+ const node = mindMap.renderer.findNodeByUid(uid)
+})
+
插入兄弟节点
插入兄弟节点和插入子节点方式完全一致:
mindMap.execCommand('INSERT_NODE' )
diff --git a/web/src/pages/Doc/zh/doExport/index.md b/web/src/pages/Doc/zh/doExport/index.md
index aa8904e9..3ff4f23e 100644
--- a/web/src/pages/Doc/zh/doExport/index.md
+++ b/web/src/pages/Doc/zh/doExport/index.md
@@ -38,13 +38,17 @@ a.download = 'xxx'
a.click()
```
-### png(name, transparent = false, rotateWhenWidthLongerThenHeight)
+### png(name, transparent = false, checkRotate)
+
+> v0.7.0以下版本为: png(name, transparent = false, rotateWhenWidthLongerThenHeight)
- `name`:名称,可不传
- `transparent`:v0.5.7+,指定导出图片的背景是否是透明的
-- `rotateWhenWidthLongerThenHeight`: v0.6.15+,Boolean, false, 是否在图片宽比高长时自动旋转90度
+- `rotateWhenWidthLongerThenHeight`: v0.6.15+,v0.7.0+已废弃,Boolean, false, 是否在图片宽比高长时自动旋转90度
+
+- `checkRotate`:v0.7.0+,Function,可以传递一个函数,接收图片的宽度和高度两个参数,返回true或false,true代表图片需要旋转90度。
导出为`png`。
diff --git a/web/src/pages/Doc/zh/doExport/index.vue b/web/src/pages/Doc/zh/doExport/index.vue
index ecc32688..58f05daf 100644
--- a/web/src/pages/Doc/zh/doExport/index.vue
+++ b/web/src/pages/Doc/zh/doExport/index.vue
@@ -27,7 +27,10 @@ a.href = 'xxx.png' 'xxx'
a.click()
-png(name, transparent = false, rotateWhenWidthLongerThenHeight)
+png(name, transparent = false, checkRotate)
+
+v0.7.0以下版本为: png(name, transparent = false, rotateWhenWidthLongerThenHeight)
+
name:名称,可不传
@@ -36,7 +39,10 @@ a.click()
transparent:v0.5.7+,指定导出图片的背景是否是透明的
-rotateWhenWidthLongerThenHeight: v0.6.15+,Boolean, false, 是否在图片宽比高长时自动旋转90度
+rotateWhenWidthLongerThenHeight: v0.6.15+,v0.7.0+已废弃,Boolean, false, 是否在图片宽比高长时自动旋转90度
+
+
+checkRotate:v0.7.0+,Function,可以传递一个函数,接收图片的宽度和高度两个参数,返回true或false,true代表图片需要旋转90度。
导出为png。
diff --git a/web/src/pages/Doc/zh/introduction/index.md b/web/src/pages/Doc/zh/introduction/index.md
index 17bf4a93..f901afa0 100644
--- a/web/src/pages/Doc/zh/introduction/index.md
+++ b/web/src/pages/Doc/zh/introduction/index.md
@@ -181,4 +181,8 @@
布林
+
+
+
南风
+
\ No newline at end of file
diff --git a/web/src/pages/Doc/zh/introduction/index.vue b/web/src/pages/Doc/zh/introduction/index.vue
index 24a656ec..9420382d 100644
--- a/web/src/pages/Doc/zh/introduction/index.vue
+++ b/web/src/pages/Doc/zh/introduction/index.vue
@@ -141,6 +141,10 @@
布林
+
+
+
南风
+
diff --git a/web/src/pages/Doc/zh/node/index.md b/web/src/pages/Doc/zh/node/index.md
index dd7ea6a9..67706eb7 100644
--- a/web/src/pages/Doc/zh/node/index.md
+++ b/web/src/pages/Doc/zh/node/index.md
@@ -110,16 +110,20 @@
`root`:是否是根节点,默认`false`
-`isActive`:获取的是否是激活状态的样式值,默认`false`
+`isActive`:v0.7.0+已废弃,获取的是否是激活状态的样式值,默认`false`
### setStyle(prop, value, isActive)
+`isActive`:v0.7.0+已废弃
+
修改节点的某个样式,`SET_NODE_STYLE`命令的快捷方法
### setStyles(style, isActive)
> v0.6.12+
+`isActive`:v0.7.0+已废弃
+
修改节点多个样式,`SET_NODE_STYLES`命令的快捷方法
### getData(key)
diff --git a/web/src/pages/Doc/zh/node/index.vue b/web/src/pages/Doc/zh/node/index.vue
index ffc2a5cc..8642a410 100644
--- a/web/src/pages/Doc/zh/node/index.vue
+++ b/web/src/pages/Doc/zh/node/index.vue
@@ -64,13 +64,15 @@
获取某个最终应用到该节点的样式值
prop:要获取的样式属性
root:是否是根节点,默认false
-isActive:获取的是否是激活状态的样式值,默认false
+isActive:v0.7.0+已废弃,获取的是否是激活状态的样式值,默认false
setStyle(prop, value, isActive)
+isActive:v0.7.0+已废弃
修改节点的某个样式,SET_NODE_STYLE命令的快捷方法
setStyles(style, isActive)
v0.6.12+
+isActive:v0.7.0+已废弃
修改节点多个样式,SET_NODE_STYLES命令的快捷方法
getData(key)
获取该节点真实数据nodeData的data对象里的指定值,key不传返回这个data对象
diff --git a/web/src/pages/Doc/zh/scrollbar/index.md b/web/src/pages/Doc/zh/scrollbar/index.md
new file mode 100644
index 00000000..49a20d1e
--- /dev/null
+++ b/web/src/pages/Doc/zh/scrollbar/index.md
@@ -0,0 +1,64 @@
+# Scrollbar 插件
+
+> v0.7.0+
+
+该插件用于帮助开发水平和垂直滚动条的功能。
+
+## 注册
+
+```js
+import MindMap from 'simple-mind-map'
+import Scrollbar from 'simple-mind-map/src/plugins/Scrollbar.js'
+MindMap.usePlugin(Scrollbar)
+```
+
+注册完且实例化`MindMap`后可通过`mindMap.scrollbar`获取到该实例。
+
+## 事件
+
+#### scrollbar_change
+
+当滚动条数据发生改变时触发,你可以监听该事件来更新滚动条位置和大小。
+
+## 方法
+
+### setScrollBarWrapSize(width, height)
+
+- `width`:Number,你的滚动条容器元素的宽度。
+
+- `height`: Number,你的滚动条容器元素的高度。
+
+设置滚动条容器的大小,对于水平滚动条,即容器的宽度,对于垂直滚动条,即容器的高度。当你的滚动条容器尺寸改变时需要再次调用该方法。
+
+### calculationScrollbar()
+
+> 需要先调用setScrollBarWrapSize方法设置滚动条容器元素的宽高。
+>
+> 一般需要监听scrollbar_change事件,然后调用该方法更新滚动条。
+
+返回值:
+
+```js
+{
+ // 垂直滚动条
+ vertical: {
+ top,
+ height
+ },
+ // 水平滚动条
+ horizontal: {
+ left,
+ width
+ }
+}
+```
+
+获取滚动条大小和位置,你可以根据返回值来设置到滚动条元素上,达到渲染和关心滚动条的效果。
+
+### onMousedown(e, type)
+
+- `e`:鼠标按下事件的事件对象。
+
+- `type`:按下的滚动条类型,vertical(垂直滚动条)、horizontal(水平滚动条)。
+
+滚动条元素的鼠标按下事件时需要调用该方法。
\ No newline at end of file
diff --git a/web/src/pages/Doc/zh/scrollbar/index.vue b/web/src/pages/Doc/zh/scrollbar/index.vue
new file mode 100644
index 00000000..fc06ba0f
--- /dev/null
+++ b/web/src/pages/Doc/zh/scrollbar/index.vue
@@ -0,0 +1,70 @@
+
+
+
Scrollbar 插件
+
+v0.7.0+
+
+
该插件用于帮助开发水平和垂直滚动条的功能。
+
注册
+
import MindMap from 'simple-mind-map'
+import Scrollbar from 'simple-mind-map/src/plugins/Scrollbar.js'
+MindMap.usePlugin(Scrollbar)
+
+
注册完且实例化MindMap后可通过mindMap.scrollbar获取到该实例。
+
事件
+
scrollbar_change
+
当滚动条数据发生改变时触发,你可以监听该事件来更新滚动条位置和大小。
+
方法
+
setScrollBarWrapSize(width, height)
+
+
设置滚动条容器的大小,对于水平滚动条,即容器的宽度,对于垂直滚动条,即容器的高度。当你的滚动条容器尺寸改变时需要再次调用该方法。
+
calculationScrollbar()
+
+需要先调用setScrollBarWrapSize方法设置滚动条容器元素的宽高。
+一般需要监听scrollbar_change事件,然后调用该方法更新滚动条。
+
+
返回值:
+
{
+
+ vertical : {
+ top,
+ height
+ },
+
+ horizontal : {
+ left,
+ width
+ }
+}
+
+
获取滚动条大小和位置,你可以根据返回值来设置到滚动条元素上,达到渲染和关心滚动条的效果。
+
onMousedown(e, type)
+
+
滚动条元素的鼠标按下事件时需要调用该方法。
+
+
+
+
+
+
+
\ No newline at end of file
From 063af62cf69ad6796157216d08da08e76d23a733 Mon Sep 17 00:00:00 2001
From: wanglin2 <1013335014@qq.com>
Date: Mon, 4 Sep 2023 16:58:57 +0800
Subject: [PATCH 38/38] =?UTF-8?q?=E6=89=93=E5=8C=850.7.0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
index.html | 4 ++--
simple-mind-map/full.js | 2 ++
simple-mind-map/package.json | 2 +-
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/index.html b/index.html
index e5fe4b27..88608025 100644
--- a/index.html
+++ b/index.html
@@ -1,7 +1,7 @@
思绪思维导图 We're sorry but thoughts doesn't work properly without JavaScript enabled. Please enable it to continue.
We're sorry but thoughts doesn't work properly without JavaScript enabled. Please enable it to continue.
\ No newline at end of file
+ }