diff --git a/web/src/pages/Doc/en/constructor/index.md b/web/src/pages/Doc/en/constructor/index.md index fd294ed5..5ecf4748 100644 --- a/web/src/pages/Doc/en/constructor/index.md +++ b/web/src/pages/Doc/en/constructor/index.md @@ -24,7 +24,7 @@ const mindMap = new MindMap({ | Field Name | Type | Default Value | Description | Required | | -------------------------------- | ------- | ---------------- | ------------------------------------------------------------ | -------- | -| el | Element | | Container element, must be a DOM element | Yes | +| el | Element | | Container element, must be a DOM element(When the position of container elements on the page has changed but the size has not changed, the 'getElRectInfo()' method must be called to update the relevant information inside the library; When the size also changes, the 'resize()' method must be called, otherwise it will cause some functional exceptions) | Yes | | data | Object 、null | | Mind map data, Please refer to the introduction of 【Data structure】 below. V0.9.9+supports passing empty objects or null, and the canvas will display blank space | | | 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 | | @@ -355,6 +355,10 @@ Current Theme Configuration. ## Instance methods +### getElRectInfo() + +Update the position and size information of container elements. Be sure to call this method to update information when the position of container elements on the page changes. If the size of container elements has also changed, please call the 'resize' method. + ### updateData(data) > v0.9.9+ diff --git a/web/src/pages/Doc/en/constructor/index.vue b/web/src/pages/Doc/en/constructor/index.vue index 85fadc3a..fc085fa0 100644 --- a/web/src/pages/Doc/en/constructor/index.vue +++ b/web/src/pages/Doc/en/constructor/index.vue @@ -1,6 +1,1587 @@ diff --git a/web/src/pages/Doc/zh/constructor/index.md b/web/src/pages/Doc/zh/constructor/index.md index fd55284f..a023d38c 100644 --- a/web/src/pages/Doc/zh/constructor/index.md +++ b/web/src/pages/Doc/zh/constructor/index.md @@ -24,7 +24,7 @@ const mindMap = new MindMap({ | 字段名称 | 类型 | 默认值 | 描述 | | -------------------------------- | ------- | ---------------- | ------------------------------------------------------------ | -| el | Element | | 容器元素,必传,必须为DOM元素 | +| el | Element | | 容器元素,必传,必须为DOM元素(当容器元素在页面上的位置发生了改变,但大小没有改变的情况下必须调用`getElRectInfo()`方法更新库内部的相关信息;当大小也发生了改变后必须调用`resize()`方法,否则会造成一些功能异常) | | data | Object 、 null | | 思维导图数据,可参考下方【数据结构】介绍。v0.9.9+支持传空对象或者null,画布会显示空白 | | layout | String | logicalStructure | 布局类型,可选列表:logicalStructure(逻辑结构图)、mindMap(思维导图)、catalogOrganization(目录组织图)、organizationStructure(组织结构图)、timeline(v0.5.4+,时间轴)、timeline2(v0.5.4+,上下交替型时间轴)、fishbone(v0.5.4+,鱼骨图) | | fishboneDeg(v0.5.4+) | Number | 45 | 设置鱼骨结构图的斜线角度 | @@ -357,6 +357,10 @@ mindMap.setTheme('主题名称') ## 实例方法 +### getElRectInfo() + +更新容器元素的位置和大小信息。当容器元素在页面中的位置发生了改变之后务必调用该方法更新信息。如果容器元素大小也发生了改变,那么请调用`resize`方法。 + ### updateData(data) > v0.9.9+ diff --git a/web/src/pages/Doc/zh/constructor/index.vue b/web/src/pages/Doc/zh/constructor/index.vue index a54dcce4..95e5b9ee 100644 --- a/web/src/pages/Doc/zh/constructor/index.vue +++ b/web/src/pages/Doc/zh/constructor/index.vue @@ -31,7 +31,7 @@ el Element -容器元素,必传,必须为DOM元素 +容器元素,必传,必须为DOM元素(当容器元素在页面上的位置发生了改变,但大小没有改变的情况下必须调用getElRectInfo()方法更新库内部的相关信息;当大小也发生了改变后必须调用resize()方法,否则会造成一些功能异常) data @@ -831,6 +831,8 @@ mindMap.setTheme('主题名称')

themeConfig

当前主题配置。

实例方法

+

getElRectInfo()

+

更新容器元素的位置和大小信息。当容器元素在页面中的位置发生了改变之后务必调用该方法更新信息。如果容器元素大小也发生了改变,那么请调用resize方法。

updateData(data)

v0.9.9+