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

docs: 文档勘误 #1837

Merged
merged 1 commit into from
Sep 3, 2024
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
4 changes: 1 addition & 3 deletions sites/docs/docs/api/model/nodeModel.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ they can do so by overriding the GetNodeStyleProperty method on `nodeModel`.

### getNodeStyle

Support for rewriting, custom node style attributes, which defaults
Support for rewriting, custom node style attributes,which defaults
to [theme baseNode](../theme.en.md#basenode)

```tsx | pure
Expand Down Expand Up @@ -492,8 +492,6 @@ const { anchors } = node

Parameters:`anchorId?: string`

## @action

### updateText

Parameters
Expand Down
8 changes: 3 additions & 5 deletions sites/docs/docs/api/model/nodeModel.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,14 @@ LogicFlow 在`model`上还维护一些属性,开发者可以通过这些属性

LogicFlow 所有的节点最终都是以 SVG DOM 的方式渲染。但是除了形状属性之外,所有的其他属于 svg
的属性都不会直接存在`nodeModel`。当开发者想要对 SVG DOM
添加更多的 <a href="https://developer.mozilla.org/zh-CN/docs/Web/SVG/Attribute" target="_blank">svg 属性</a>
添加更多的 <a href="https://developer.mozilla.org/zh-CN/docs/Web/SVG/Attribute" target="_blank">svg 属性</a>
时,可以通过重写`nodeModel`上获取节点样式属性方法来实现。

## 方法

### getNodeStyle

支持重写,自定义节点样式属性, 默认为[主题 baseNode](../theme.zh.md#basenode)
支持重写,自定义节点样式属性,默认为[主题 baseNode](../theme.zh.md#basenode)

```tsx | pure
class UserTaskModel extends RectNodeModel {
Expand Down Expand Up @@ -449,7 +449,7 @@ class UserTaskModel extends RectNodeModel {
| targetAnchor | `Model.AnchorConfig` | ✅ | 目标锚点 |
| edgeId | `string` | - | 调整后边的 id |

返回值 `LogicFlow.ConnectRuleResult`
返回值 `LogicFlow.ConnectRuleResult`
<a href="https://github.com/didi/LogicFlow/issues/926#issuecomment-1371823306" target="_blank">详见issues</a>

### getRotateControlStyle
Expand Down Expand Up @@ -484,8 +484,6 @@ const { anchors } = node

入参:`anchorId?: string`

## @action

### updateText

修改节点文本内容
Expand Down