Skip to content

Commit e35f155

Browse files
committed
docs: 优化小地图文档注意事项的样式
1 parent 1b67d21 commit e35f155

File tree

2 files changed

+36
-32
lines changed

2 files changed

+36
-32
lines changed

sites/docs/docs/tutorial/extension/minimap.en.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,18 @@ const lf = new LogicFlow({
6363

6464
The `miniMapOptions` configuration is as follows:
6565

66-
| Property Name | Type | Default Value | Required | Description |
67-
| -------------- | ------ | ------------- | -------- | ---------------------------------------- |
68-
| width | number | 150 | - | The width of the canvas in the MiniMap |
69-
| height | number | 220 | - | The height of the canvas in the MiniMap |
70-
| showEdge | boolean| false | - | Whether to render edges in the MiniMap |
71-
| headerTitle | string | Navigation | - | The text content of the MiniMap's title bar; defaults to not showing |
72-
| isShowHeader | boolean| false | - | Whether to show the MiniMap's title bar |
73-
| isShowCloseIcon | boolean| false | - | Whether to show the close button |
74-
| leftPosition | number | - | - | The left margin of the MiniMap from the canvas's left boundary; takes precedence over `rightPosition` |
75-
| rightPosition | number | 0 | - | The right margin of the MiniMap from the canvas's right boundary; lower priority than `leftPosition` |
76-
| topPosition | number | - | - | The top margin of the MiniMap from the canvas's top boundary; takes precedence over `bottomPosition` |
77-
| bottomPosition | number | 0 | - | The bottom margin of the MiniMap from the canvas's bottom boundary; lower priority than `topPosition` |
66+
| Property Name | Type | Default Value | Required | Description |
67+
| --------------- | ------- | ------------- | -------- | ----------------------------------------------------------------------------------------------------- |
68+
| width | number | 150 | - | The width of the canvas in the MiniMap |
69+
| height | number | 220 | - | The height of the canvas in the MiniMap |
70+
| showEdge | boolean | false | - | Whether to render edges in the MiniMap |
71+
| headerTitle | string | Navigation | - | The text content of the MiniMap's title bar; defaults to not showing |
72+
| isShowHeader | boolean | false | - | Whether to show the MiniMap's title bar |
73+
| isShowCloseIcon | boolean | false | - | Whether to show the close button |
74+
| leftPosition | number | - | - | The left margin of the MiniMap from the canvas's left boundary; takes precedence over `rightPosition` |
75+
| rightPosition | number | 0 | - | The right margin of the MiniMap from the canvas's right boundary; lower priority than `leftPosition` |
76+
| topPosition | number | - | - | The top margin of the MiniMap from the canvas's top boundary; takes precedence over `bottomPosition` |
77+
| bottomPosition | number | 0 | - | The bottom margin of the MiniMap from the canvas's bottom boundary; lower priority than `topPosition` |
7878

7979
## API
8080

@@ -95,7 +95,9 @@ Providing only `left` and `top` values allows integration with the `lf.getPointB
9595
- `lf-mini-map-graph` - MiniMap canvas element
9696
- `lf-mini-map-close` - MiniMap close icon element
9797

98-
> `MiniMap.show()` must be called after `lf.render()`.
98+
:::warning
99+
`MiniMap.show()` must be called after `lf.render()`. Otherwise, the console will always show a warning.
100+
:::
99101

100102
### hide
101103

@@ -157,7 +159,7 @@ lf.extension.miniMap.setShowEdge(showEdge: boolean): void
157159
158160
MiniMap events.
159161
160-
| Event Name | Description | Event Object |
161-
| ---------------- | --------------------- | ------------ |
162-
| miniMap:close | MiniMap hidden | {} |
162+
| Event Name | Description | Event Object |
163+
| ------------- | -------------- | ------------ |
164+
| miniMap:close | MiniMap hidden | {} |
163165

sites/docs/docs/tutorial/extension/minimap.zh.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,18 @@ const lf = new LogicFlow({
6666

6767
`miniMapOptions` 配置如下:
6868

69-
| 属性名 | 类型 | 默认值 | 必填 | 描述 |
70-
| --------- | -------- | -------------------------- | -------- | -------------------------------------------------------------- |
71-
| width | number | 150 | - | 小地图中画布的宽度 |
72-
| height | number | 220 | - | 小地图中画布的高度 |
73-
| showEdge | boolean | false | - | 在小地图的画布中是否渲染边 |
74-
| headerTitle | string | 导航 | - | 小地图标题栏的文本内容,默认不显示 |
75-
| isShowHeader | boolean | false | - | 是否显示小地图的标题栏 |
76-
| isShowCloseIcon | boolean | false | - | 是否显示关闭按钮 |
77-
| leftPosition | number | - | - | 小地图与画布左边界的左边距,优先级高于`rightPosition` |
78-
| rightPosition | number | 0 | - | 小地图与画布右边界的右边距,优先级低于`leftPosition` |
79-
| topPosition | number | - | - | 小地图与画布上边界的上边距,优先级高于`bottomPosition` |
80-
| bottomPosition | number | 0 | - | 小地图与画布下边界的下边距,优先级低于`topPosition` |
69+
| 属性名 | 类型 | 默认值 | 必填 | 描述 |
70+
| --------------- | ------- | ------ | ---- | ------------------------------------------------------ |
71+
| width | number | 150 | - | 小地图中画布的宽度 |
72+
| height | number | 220 | - | 小地图中画布的高度 |
73+
| showEdge | boolean | false | - | 在小地图的画布中是否渲染边 |
74+
| headerTitle | string | 导航 | - | 小地图标题栏的文本内容,默认不显示 |
75+
| isShowHeader | boolean | false | - | 是否显示小地图的标题栏 |
76+
| isShowCloseIcon | boolean | false | - | 是否显示关闭按钮 |
77+
| leftPosition | number | - | - | 小地图与画布左边界的左边距,优先级高于`rightPosition` |
78+
| rightPosition | number | 0 | - | 小地图与画布右边界的右边距,优先级低于`leftPosition` |
79+
| topPosition | number | - | - | 小地图与画布上边界的上边距,优先级高于`bottomPosition` |
80+
| bottomPosition | number | 0 | - | 小地图与画布下边界的下边距,优先级低于`topPosition` |
8181

8282
## API
8383

@@ -100,7 +100,9 @@ lf.extension.miniMap.show(left?: number, top?: number): void
100100
- `lf-mini-map-graph` - mini-map 画布元素
101101
- `lf-mini-map-close` - mini-map 关闭图标元素
102102

103-
> `MiniMap.show()`必须在`lf.render()`后调用。
103+
:::warning
104+
`MiniMap.show()`必须在`lf.render()`后调用。否则控制台会一直有警告
105+
:::
104106

105107
### hide
106108

@@ -174,6 +176,6 @@ lf.extension.miniMap.setShowEdge(showEdge: boolean): void
174176

175177
mini-map 事件。
176178

177-
| 事件名 | 说明 | 事件对象 |
178-
| --------- | -------- | --------------------------- |
179-
| miniMap:close | 小地图隐藏 | {} |
179+
| 事件名 | 说明 | 事件对象 |
180+
| ------------- | ---------- | -------- |
181+
| miniMap:close | 小地图隐藏 | {} |

0 commit comments

Comments
 (0)