Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Doc] add doc for new option view.expander_style #547

Merged
merged 1 commit into from
Dec 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/en/2.options.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@ These options are described in more detail below.

> The option can be used to change the default rendering logic of jsMind. The value of this option is a function, whose signature is `function (jm, element, node): boolean`. Its return value is used to indicate whether the node has been rendered. If it returns `true`, jsMind won't render the node again, otherwise, jsMind will render the node in the default way.

**view.expander_style** : (string) style of the node expander (since 0.7.8)

> * `char` - show `-`, `+` in the expander to represent the expanded status [default]
> * `number` - show the count of children node in the expander, when the count of children more than 99, show `...` instead

**layout.hspace** : horizontal distance (pixels) between (number) nodes
**layout.vspace** : vertical spacing (pixels) between (number) nodes

Expand Down
7 changes: 6 additions & 1 deletion docs/zh/2.options.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,19 @@ options = {
> * `wrap` - 对文本进行换行,以展示全部文本内容

**view.zoom** : (object) 脑图缩放配置 (0.6.3 及以上版本支持)
> * min - 最小的缩放比例,默认 0.5
> * min - 最小的缩放比例,默认 0.5
> * max - 最大的缩放比例,默认 2.1
> * step - 缩放比例间隔,默认 0.1

**view.custom_node_render** : (function) 脑图节点的自定义渲染方法 (0.7.6 及以上版本支持)

> 此选项可用于修改 jsMind 默认的渲染逻辑,此参数为一个 javascript 方法,其方法签名为 `function (jm, element, node): boolean `。其返回值用于表示是否已经对此节点进行了渲染,如果返回 `true`, jsMind 将不会再次渲染此节点;如果返回 false, jsMind 将使用默认渲染逻辑对此节点进行渲染。

**view.expander_style** : (string) 子节点展开控制器的样式 (0.7.8 及以上版本支持)

> * `char` - 在展开控制器上显示 `-`, `+` 用于表示节点的展开状态 [default]
> * `number` - 在展开控制器上显示子节点的数量,多于100个子节点时将显示 `...`

**layout.hspace** : (number) 节点之间的水平间距(像素)
**layout.vspace** : (number) 节点之间的垂直间距(像素)

Expand Down