gis-view-webgl2 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -8
- package/dist/gis-view.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1036 -249
- package/dist/index.js +1 -1
- package/docs/AI/345/257/271/350/257/235/346/261/207/346/200/273.md +194 -0
- package/docs/GisView.md +9 -8
- package/docs/GisView/345/256/236/347/216/260/345/216/237/347/220/206.md +2 -2
- package/docs/ai/06-/344/274/232/350/257/235/347/264/242/345/274/225/344/270/216/345/244/215/346/237/245/346/226/271/346/263/225.md +172 -0
- package/docs/api/index.html +545 -59
- package/docs/demos/BackendSyncDemo.vue +10 -8
- package/docs/demos/BasicDemo.vue +101 -101
- package/docs/demos/BatchAddDemo.vue +5 -5
- package/docs/demos/ChannelDemo.vue +617 -10
- package/docs/demos/ConnectDemo.vue +392 -0
- package/docs/demos/CopyMergeDemo.vue +980 -929
- package/docs/demos/DecorationDraftDemo.vue +1300 -0
- package/docs/demos/DemoShell.vue +569 -240
- package/docs/demos/DragDropDemo.vue +11 -11
- package/docs/demos/EffectsDemo.vue +6 -6
- package/docs/demos/EventDemo.vue +327 -327
- package/docs/demos/ExtensionDemo.vue +458 -0
- package/docs/demos/GisViewDemo.vue +61 -48
- package/docs/demos/GraphicDemo.vue +338 -0
- package/docs/demos/LabelDemo.vue +553 -497
- package/docs/demos/MinimapDemo.vue +358 -0
- package/docs/demos/PerfDemo.vue +29 -0
- package/docs/demos/SearchFilterDemo.vue +412 -0
- package/docs/demos/StyleDemo.vue +121 -121
- package/docs/demos/api-index.js +98 -77
- package/docs/demos/demos.js +159 -135
- package/docs/demos/shared/demoData.js +107 -107
- package/docs/demos/shared/demoStyle.css +249 -249
- package/docs/demos/shared/fakeBackend.js +93 -6
- package/docs/format/03-/346/213/220/347/202/271/350/243/205/351/245/260/344/270/216/346/240/267/345/274/217.md +28 -8
- package/docs/format/04-/351/200/232/351/201/223/344/270/216/346/240/207/347/255/276.md +5 -4
- package/docs/format/06-/345/257/274/345/205/245/345/257/274/345/207/272/344/270/216/346/240/207/345/207/206/346/226/207/346/241/243.md +8 -6
- package/docs/format/07-/344/272/213/344/273/266/350/275/275/350/215/267/344/270/216/347/244/272/344/276/213/346/225/260/346/215/256.md +6 -6
- package/docs/guide/sample-document.html +4 -4
- package/docs/index.html +180 -9
- package/docs/internals/11-/350/246/206/347/233/226/345/261/202/346/240/207/347/255/276/344/270/216/346/217/220/347/244/272.md +1 -1
- package/docs/internals/13-/351/271/260/347/234/274/345/233/276.md +3 -2
- package/docs/internals/15-03-/351/200/220/350/275/256/350/256/260/345/275/225-/346/200/247/350/203/275/344/270/216/344/277/256/345/244/215-/344/270/213.md +16 -0
- package/docs/internals/16-03-/344/274/230/345/214/226/344/270/216/345/217/226/350/210/215-/344/270/213.md +11 -0
- package/docs/internals/17-/350/260/203/350/257/225/344/270/216/346/211/251/345/261/225/345/273/272/350/256/256.md +1 -1
- package/docs/manual/02-/345/235/220/346/240/207/344/270/216/346/225/260/346/215/256.md +18 -4
- package/docs/manual/03-/351/205/215/347/275/256/351/241/271.md +110 -25
- package/docs/manual/04-/344/272/213/344/273/266/344/270/216/345/233/236/350/260/203.md +13 -8
- package/docs/manual/06-/346/225/260/346/215/256/344/270/216/345/234/272/346/231/257/346/233/264/346/226/260.md +111 -10
- package/docs/manual/07-/346/214/207/351/222/210/344/270/216/350/246/201/347/264/240/347/274/226/350/276/221.md +47 -9
- package/docs/manual/08-/351/200/211/344/270/255/344/270/216/346/213/220/347/202/271.md +17 -15
- package/docs/manual/09-/351/200/232/351/201/223/344/270/216/345/244/232/345/233/236/347/272/277.md +61 -11
- package/docs/manual/10-/351/200/232/351/201/223/347/274/226/350/276/221/344/270/216/346/226/260/345/242/236.md +74 -7
- package/docs/manual/11-/346/240/267/345/274/217/344/270/216/350/247/204/345/210/231.md +3 -2
- package/docs/manual/12-/346/240/207/347/255/276/344/270/216/350/243/205/351/245/260.md +260 -3
- package/docs/manual/13-/345/212/250/346/225/210/344/270/216/345/233/276/345/205/203.md +6 -5
- package/docs/manual/14-/350/247/206/345/233/276/344/270/216/347/255/233/351/200/211.md +27 -14
- package/docs/manual/15-/345/257/274/345/207/272/344/270/216/351/233/206/346/210/220.md +142 -49
- package/docs/manual/16-/345/256/236/344/276/213/346/226/271/346/263/225/346/200/273/350/241/250.md +31 -29
- package/docs/manual/17-/345/217/202/346/225/260/351/200/237/346/237/245.md +55 -39
- package/docs/manual/18-/351/200/220/346/226/271/346/263/225/347/244/272/344/276/213.md +189 -64
- package/docs/manual/19-/350/257/273/346/225/260/344/270/216/346/213/226/346/213/275/351/242/204/350/247/210.md +4 -4
- package/docs/manual/20-/346/200/247/350/203/275/344/270/216/345/244/247/346/225/260/346/215/256.md +42 -2
- package/docs/manual/21-/350/257/264/346/230/216/344/270/216/345/270/270/350/247/201/351/227/256/351/242/230.md +22 -6
- package/docs/playground/index.html +5 -5
- package/docs/steps/README.md +14 -10
- package/docs/steps/check-doc-truth.mjs +1 -1
- package/docs/steps/selftest-actions.html +10 -10
- package/docs/steps/selftest-data.html +96 -14
- package/docs/steps/selftest-decoration.html +577 -0
- package/docs/steps/selftest-demo.html +6 -5
- package/docs/steps/selftest-demos.html +2201 -1612
- package/docs/steps/selftest-docs.html +89 -16
- package/docs/steps/selftest-effects.html +5 -5
- package/docs/steps/selftest-features.html +757 -86
- package/docs/steps/selftest-full.html +583 -583
- package/docs/steps/selftest-labels.html +1034 -652
- package/docs/steps/selftest-perf.html +1899 -1844
- package/docs/steps/selftest-scale.html +117 -7
- package/docs/steps/selftest-select.html +24 -17
- package/docs/steps/step-10-full.js +1 -1
- package/docs//346/216/245/345/217/243/345/215/217/350/256/256.md +167 -17
- package/docs//346/225/260/346/215/256/346/240/274/345/274/217.md +1 -1
- package/package.json +43 -43
- package/docs/demos/HistoryDemo.vue +0 -230
- package/docs/demos/InterfaceDemo.vue +0 -309
- package/docs/demos/SampleDemo.vue +0 -283
package/docs/manual/16-/345/256/236/344/276/213/346/226/271/346/263/225/346/200/273/350/241/250.md
CHANGED
|
@@ -12,9 +12,7 @@
|
|
|
12
12
|
| `updatePointStyle(patch)` / `updateLineStyle(patch)` | 改全局点 / 线样式的某几个字段(字段级合并,不写的保持原来的那一份):`updateOptions({ pointStyle })` 是整份换(没写的字段等于回到内置默认),这两个只动给出来的键 —— 面板上拖大小 / 换调色板一个键一条,不会把样式表里别的配置碰掉;传 `null` 清掉整份全局样式,写错的字段名走 `onWarning` 点名。只改尺寸链(`size` / `sizeScale`)或配色链(`color` / `strokeColor` / `strokeWidth` / `opacity`)时引擎走「逐要素只重算这条链」的窄路,逐点自己定死了这一项的要素连槽位都不重写,见「大数据量」 |
|
|
13
13
|
| `getOptions()` | 当前配置与数据的副本 |
|
|
14
14
|
| `getData()` | 当前数据副本(**点与线两列**,含拖拽点之后的最新坐标);通道声明不在这一份里 —— 读整份配置与数据用 `getOptions()`(`getOptions().channels`)、存档 / 回灌用 `exportData({ format: 'input' })` |
|
|
15
|
-
| `updateData(points, lines, channels?)` | 整份换数据:只给两个参数时换点与线(通道不动);给 `channels` 时连通道一起换(切场景一次换完、只发一条 `onDataChange`);也收单对象写法 `updateData({ points, lines, channels })
|
|
16
|
-
| `updatePoints(points)` / `updateLines(lines)` | 只替换点或线数据 |
|
|
17
|
-
| `updateChannels(channels)` | 整份替换通道声明(回线怎么分组、骨架拐点在哪),场站与回线数据不动;与 `updateChannel(id, patch)`(按 id 只改一条)一对。声明里没写分组 id 时引擎按「单组用通道 id、多组 `通道id::1` / `通道id::2`…」补,并把最终分组(含拐点路径)与对齐后的成员表写回数据副本;认不出的成员 id、重名的分组 id 各报一句 `onWarning` |
|
|
15
|
+
| `updateData(points, lines, channels?)` | 整份换数据:只给两个参数时换点与线(通道不动);给 `channels` 时连通道一起换(切场景一次换完、只发一条 `onDataChange`);也收单对象写法 `updateData({ points, lines, channels })`,只换给出的那几列 —— 只换通道声明写 `updateData({ channels })`,只换节点 / 线路写 `updateData({ points })` / `updateData({ lines })`。接口字段先在调用方映射成这三列,见「动态换数据与加载完成」 |
|
|
18
16
|
| `importData(input, options?)` | 整份喂回一份数据 / 一份标准文档(`exportData` 的五种格式都认,最标准的是 `format: 'full'` 那一份):顶层出哪一列就应用哪一列(`points` / `lines` / `channels` / `labelStates` / `view` / `filter`),没出的列一个都不动;只给通道(不带点线)时单独换通道声明,只给 `labelStates` 时只动标签状态(整份语义)。返回 `{ ok, reason, applied, counts, warnings }`,见「标准数据文档(full):接收 == 导出」 |
|
|
19
17
|
| `patchPoints(entries, patch?)` / `patchLines(entries, patch?)` | 批量打补丁(只动点到的这几条,不换整份数据):`patchPoints([{ id: 'a', name: 'A' }, { index: 3, x: 10 }])` 一次改几条(`id` / `index` 之外的字段就是这一条的补丁),或者 `patchPoints(['a', 'b'], { status: 1 })` 把同一份补丁盖到一批定位上(`'a'` / `{ index: 2 }` 都认)。认不出来的进 `skipped`、不影响其余条目;返回 `{ ok, reason, indexes, items, count, skipped }`,**只记一条历史、只发一条** `updatePoints` / `updateLines` 数据变更 —— 十万级批量改不必逐条付事件与历史的代价,见「批量更新(batch)」 |
|
|
20
18
|
| `getLabelStates(kind?)` | 标签的运行时状态(拖出来的偏移 + 逐条覆盖,每条带 `labelId`):`kind` 写 `'point'` / `'line'` 只取一类;做持久化 / 回显编辑面板用它,见「标签的拖动与编辑」 |
|
|
@@ -70,12 +68,11 @@
|
|
|
70
68
|
| `hoverAt(clientX, clientY)` / `clearHover()` / `getHover()` | 程序化悬停:`hoverAt` 让指针「停」到某个客户端坐标上(悬停高亮、光标与 `onHover` 一起更新,返回与 `onHover` 载荷同一份读数,空白处 `null`;不走悬停阈值,也不用先订阅事件)、`clearHover()` 撤掉并补发一条 `onHover(null)`、`getHover()` 随时读当前这一份 —— 外部列表 / 表格 hover 到某一行时联动高亮图上的要素用它 |
|
|
71
69
|
| `getFeaturesInRect(rect)` | 画布 CSS 像素矩形里有什么(与框选 / `selectInBox` 同一套坐标与判定):返回 `{ rect, worldRect, points, lines }` —— `points` 是框内的节点(与 `onSelect` 的 `items` 同一口径)、`lines` 是包围盒沾到框的线路(与 `listLines` 同一份)、`worldRect` 是这块像素对应的世界坐标范围;只读,不改选中也不画框 |
|
|
72
70
|
| `getChannelsInView()` | 当前视口里有哪几条通道(同一通道的几回线只算一条):每条给 `{ channelId, channelIndex, channel, lineIndexes, groupIds }`,侧边栏「画面里的通道」、按视口统计用它 |
|
|
73
|
-
| `
|
|
74
|
-
| `
|
|
75
|
-
| `deselect(refs?)` | 取消选中:写法与 `selectFeatures` 完全一样,把这些从当前选中集里去掉、其余选中原样留着;不传 / `null` 等于取消全部(也就是 `select(null)`),空数组是「没有目标」什么都不做,见「取消选中(deselect / select(null))」 |
|
|
71
|
+
| `selectFeatures(refs, options?)` | 接口选中(换一份选中集;`selectFeatures(null)` / 空数组就是清空):`refs` 认 id、id 数组、`{ type, index }`、通道写法(`{ type: 'channel', channelId }` / `{ channelId, groupId }` / `{ channelId, lineIds }`)以及拾取载荷与搜索命中;`options.mode` 给 `'replace'`(缺省,换一份)/ `'add'` / `'toggle'`(在就取消、不在就选上)/ `'remove'`,见「接口选中(selectFeatures)与读回选中」 |
|
|
72
|
+
| `deselect(refs?)` | 取消选中:写法与 `selectFeatures` 完全一样,把这些从当前选中集里去掉、其余选中原样留着;不传 / `null` 等于取消全部(也就是 `selectFeatures(null)`),空数组是「没有目标」什么都不做,见「取消选中(deselect / selectFeatures(null))」 |
|
|
76
73
|
| `getSelections()` | 读回选中结果 `[{ type, index, item, … }]`(按选中顺序):要 id 列表 / 个数 / 包围盒看 `getSelectionData()` |
|
|
77
74
|
| `isSelected(ref)` | 这个要素在不在当前选中集里:`isSelected('node-0')`(id)/ `isSelected({ type: 'line', index: 12 })`(也可以只写下标,按 id 认不出来时当下标),返回 `true` / `false`。面板上高亮「当前这一行」时不必自己比对 `getSelections()`;选中集变化时缓存一份键集合(见「接口选中」),十万级选中下这一问也是常数级 |
|
|
78
|
-
| `getSelectionData()` | 选中集一次取全:读数(`ids` / `count` / `pointCount` / `lineCount` / `channelCount`)加要素本身(`points` / `lines` / `channels`(按通道去重,与 `getData()` 同一批对象)),另有 `items`(与 `getSelections()` 同一份)、`pointIndexes` / `lineIndexes` 与 `bounds`(世界包围盒,空选中时 `null`),见「接口选中(
|
|
75
|
+
| `getSelectionData()` | 选中集一次取全:读数(`ids` / `count` / `pointCount` / `lineCount` / `channelCount`)加要素本身(`points` / `lines` / `channels`(按通道去重,与 `getData()` 同一批对象)),另有 `items`(与 `getSelections()` 同一份)、`pointIndexes` / `lineIndexes` 与 `bounds`(世界包围盒,空选中时 `null`),见「接口选中(selectFeatures)与读回选中」 |
|
|
79
76
|
| `selectInBox(box, options?)` | 按画布 CSS 像素矩形框选,等价于 Shift + 拖动(跟随 `shortcuts.boxSelect`);`options.selectionKinds` 可只覆盖这一次的节点 / 线路 / 通道类型过滤 |
|
|
80
77
|
| `beginCopyPoint(options?)` | 开始复制一个节点:给 `id` / `index` 直接出预览(`commit: true` 出预览即落地,`follow: true` 跟随鼠标,`autoCommit: false` 停在预览态),不给来源就是「先点按钮再选节点」模式,见「节点复制」 |
|
|
81
78
|
| `commitPointCopy()` / `cancelPointCopy()` | 落地 / 取消预览中的复制(返回 `end` / `cancel` 载荷) |
|
|
@@ -86,7 +83,8 @@
|
|
|
86
83
|
| `copyPointToClipboard(sources?, options?)` / `copyPointsToClipboard(sources?, options?)` / `pastePoint(options?)` / `pastePoints(options?)` / `getPointClipboard()` | 剪贴板:`copyPointToClipboard` 默认收当前选中的全部节点(只有没选中才回落到光标下的那个),`copyPointsToClipboard` 只认给定 / 选中的一批;Ctrl+V 时单节点且没有内部线路 / 通道仍走原预览,多节点或带线路 / 通道走整组落地,`pastePoints` 强制整组(单节点也走批量载荷)。`getPointClipboard()` 读 `count` / `sources` / `items` / `lines` / `channels` / `anchor` 快照,见「节点复制」 |
|
|
87
84
|
| `mergePoints(source, target, options?)` | 把来源节点并进目标节点(接口调用,不做确认):来源 / 目标收 id、下标或 `{ id }` / `{ index }`,节点数据按 `merge.createItem` 合并(缺省目标优先、尺寸取双方最大、图标优先目标),改线路绑定、删自环 / 零长线 / 自环通道、把撞成同一条的通道合成一条,返回 `{ ok, item, linesChanged, removedLines, removedChannels, mergedChannels }`;并不了返回 `ok: false` 并另发一条失败事件,见「节点合并」 |
|
|
88
85
|
| `mergeSelectedPoints(options?)` | 框选 / 多选之后一步把选中的节点并到一个目标上(接口调用):`target` 不指定就自动挑**绑定线路最多**的那一个(一样多取画得大的、再取下标小的),来源默认是除目标之外的选中节点、也可以用 `sources`(id / 下标 / `{ id }` / `{ index }`,单个或数组)直接给 —— 这时不用先选中;`mergeable: false` 默认跳过(`force: true` 越过)、`label` 改这一步历史的标签。**多个来源合成一步历史**(数据变更收成一条 `batch`),返回 `{ phase: 'mergeSelected', ok, reason, target, merged, skipped, sourcesMerged, linesChanged, removedLines, removedChannels, mergedChannels, channelsChanged }`,见「节点合并」 |
|
|
89
|
-
| `
|
|
86
|
+
| `splitPoint(source, parts, options?)` | `mergePoints` 的逆操作:把一个节点拆成两份或更多(第一份接在原下标上、缺省沿用原 id,其余追加到末尾),按每份的 `item` / 顶层字段生成新节点,按 `lines` 分配线路、按 `channels` / `channelFrom` / `channelTo` 分配受影响通道的两端。没显式分配的线路跟第一份;没显式分配的通道端点跟它第一条被分配过的成员回线。线路的 `from` / `to` 与和来源坐标重合的 `start` / `end` / `path` 顶点改到对应新节点;拆完后的自环 / 零长度线路与两端落到同一份的通道删掉,成员全没了的通道也删掉。整次调用只记一条历史、只发一条 `splitPoint` 数据变更,返回的 `changes` 可直接作为后端事务输入;至少两份、坐标必须有效、线路不能重复分配,写错时 `ok: false` 并在 `reason` 说明 |
|
|
87
|
+
| `getPointMerge()` / `resolvePointMerge(confirmed?, options?)` / `commitPointMerge()` / `revertPointMerge(options?)` | 读 / 裁决 / 收尾当前待确认的合并(把一个节点拖到另一个节点上之后):`resolvePointMerge(true, { keep, item })` 推进到 `confirm` 阶段 —— `keep` 选保留碰撞目标(缺省)还是拖动的来源,`item` 改写最终节点的信息与样式,位置 / id 始终取保留端;`resolvePointMerge(false)` 让拖动的节点回原位。`pending` / `confirm` / `getPointMerge()` 的载荷带 `impact`(受影响线路条数、具体 lineIds 与通道读数;`lineCount` 按线路去重,`linesChanged` / `removedLines` 与落地结果同口径)。自己接管数据落地时用 `commitPointMerge()` 收状态、`revertPointMerge()` 还原(`silent: true` 不补发 cancel 载荷) |
|
|
90
88
|
| `removePoints(refs, options?)` | 移除节点(接口调用):`'a'` / `{ index: 2 }` / 数组都收,绑在它上面的线路一并删掉、声明了它当端点的整条通道(含成员回线)跟着删,返回 `{ ok, indexes, items, removedLines, removedChannels }` |
|
|
91
89
|
| `requestRemove(options?)` | 发起一次删除(Delete 键同一条路):把选中的拐点 / 线路 / 节点与它们的连带影响摊成一份载荷交给 `onRemove` / `'remove'`,停在 `pending` 等裁决(确认方式见 `remove.confirm`),没有可删的东西时返回 `{ phase: 'empty', ok: false, reason }`,见「删除(remove)」 |
|
|
92
90
|
| `getRemoveRequest()` | 当前待确认的删除请求(没有就返回 `null`):面板自己弹确认框时拿它渲染 |
|
|
@@ -96,15 +94,12 @@
|
|
|
96
94
|
|
|
97
95
|
| `exportImage(options?)` | 导出当前画面(含标签)为图片,返回 data URL,见「导出图片」 |
|
|
98
96
|
| `exportSelection(options?)` | 把选中的节点(可选带上两端都在集合里的线路)单独导成图片 / 数据:`points` 不给就用选中集,`withLines` / `format` / `padding` 见「导出选中的节点」;返回 `{ ok, reason, points, lines, counts, box, pointIndexes, lineIndexes, image }`,出图时临时藏起别的要素与相机、出完还原 |
|
|
99
|
-
| `
|
|
100
|
-
| `exportData(options?)` | 一次把数据按概念分好:`format: 'view'`(缺省)给 `{ points, lines, channels, parallelGroups }`、`'new'` 给 new.json 口径(`station_data` + `channel_data` + 四至范围那几列)、`'test'` 给 test.json 口径(`point_data` + `line_data` + `parallel_groups`)、`'input'` 给与 `createGisView` 入参同构的 `{ points, lines, channels }`(回灌口径,导出再导入即回显);`parts` 多选分项(没要的连记录都不生成,选通道 / 线路自动带上拐点)、`points` / `lines` / `channels` 可以只要一部分,解不出的引用进 `warnings`,`format` 写错抛异常,见「导出数据」 |
|
|
101
|
-
| `exportViewportData(options?)` | **视口内**的那一撮数据:范围按 `getViewRect()` 筛(节点按中心、线路按包围盒、通道按成员回线,分组一起走),其余口径与 `exportData` 完全同写;`margin` 是屏幕 CSS 像素的外扩、`rect` 直接给世界矩形,返回多带 `viewRect` / `margin` 两条读数,见「导出数据」 |
|
|
102
|
-
| `exportStationData(options?)` | 节点按 new.json 的 `station_data` 口径导出(另带 `show_station_list` / `show_station_data` 与四至范围,`box: false` / `showStation: false` 可关) |
|
|
103
|
-
| `exportPointData(options?)` | 节点按 test.json 的 `point_data` 口径导出(同一份数据换一套列名,带 `zone_id` / `zone_name`) |
|
|
104
|
-
| `exportLineData(options?)` | 线路按 test.json 的 `line_data` 口径导出:通道回线带上 `channel_id` / `channel_name` / `parallel_group_id` 与 `index`(第几回),`coords_list` 是当下画出来的折线 |
|
|
105
|
-
| `exportChannelData(options?)` | 通道按 new.json 的 `channel_data` 口径导出:一条通道一行、回线在 `line_data` 里、路由在 `coords` 里;`options.lines` 可以只要其中几条回线 |
|
|
106
|
-
| `exportParallelGroups(options?)` | 拐点分组按 test.json 的 `parallel_groups` 口径导出(与通道数据分开):缺省只出加过 / 拖过拐点的,`all: true` 连没编辑过的一起列,`channels` 可以只留某几条通道 / 分组 |
|
|
97
|
+
| `exportData(options?)` | **统一导出入口**:`scope` 选范围(`'all'` 缺省 / `'viewport'` / `'selection'`,也认 `visible` / `view` / `selected`),`parts` 选分项,`format` 选口径。`format: 'view'`(缺省)给 `{ points, lines, channels, parallelGroups }`、`'new'` 给 new.json 口径、`'test'` 给 test.json 口径、`'input'` 给与 `createGisView` 入参同构的回灌口径、`'full'` 给标准文档;`format` 也可以是注册过的自定义名字。`points` / `lines` / `channels` 可以只要一部分,解不出的引用进 `warnings`,`format` 写错(或没注册)抛异常,见「导出数据」与「自定义导出格式」 |
|
|
107
98
|
| `snapshotScene(options?)` | 当前画面的矢量快照(屏幕坐标的线 / 点 / 标签 / 背景 / 网格):`{ width, height, background, backgroundImage, grid, regions, lines, points, backgroundPoints, decorations, waypoints, raised, labels }`,`options.background: false` 丢背景、`options.backgroundColor` 只换底色、`options.labels` 原样带进去,见「导出图片」 |
|
|
99
|
+
| `addGraphic(graphic)` / `addGraphics(list)` | 新增扩展图形(SVG 路径 / 图片 / Canvas):世界坐标锚点、屏幕像素尺寸、可选 `scaleWithView`;`id` 已存在时按更新覆盖,返回归一化后的图形读数(批量返回数组)。只动图形层 DOM,不重排场景,见「扩展图形(graphic)」 |
|
|
100
|
+
| `updateGraphic(id, patch)` | 改一个扩展图形的字段(写法与创建一致,`style.width` / `style.height` 也认),返回改后的读数;id 不存在返回 `null` |
|
|
101
|
+
| `removeGraphic(id)` / `clearGraphics()` | 按 id 删一条 / 清空整层,分别返回删掉的读数与清掉的条数;节点 / 线路 / 标签 / 数据 / 历史都不受影响 |
|
|
102
|
+
| `getGraphic(id)` / `getGraphics()` | 读一条(副本,没有时 `null`)/ 读全部(按 `zIndex`、再按加入顺序) |
|
|
108
103
|
| `isLayoutReady()` | 大数据发散渲染(`progressiveInit`)是否已经铺完;没铺完时标签与拾取只看得到已经画出去的那部分 |
|
|
109
104
|
| `addWaypoint(lineId, coordinate)` / `removeWaypoint(lineId, pathIndex)` | 在线路上增删拐点,等价于 Ctrl + 点击与 Delete |
|
|
110
105
|
| `addWaypoints(lineId, coordinates, options?)` | 一次给一条线路插多个拐点:按数组顺序插入,多个拐点合成**一步历史**;坐标写错的条目跳过,返回 `{ ok, reason, count, lineId, lineIndex, coordinates }`(`coordinates` 是实际插入成功的坐标),线路不存在或 `waypointEditable: false` 时 `ok: false` |
|
|
@@ -124,40 +119,44 @@
|
|
|
124
119
|
| `addChannelGroupWaypoint(channelId, groupId?, coordinate?)` | 给某个分组加拐点、把这一组单独拉走:不给坐标就按默认位置放一个(第 n 组沿法线往外让 n 档),其余分组一根拐点都不动,见「分组拐点」 |
|
|
125
120
|
| `removeChannelGroupWaypoint(channelId, groupId?, pathIndex?)` | 删掉某个分组的拐点(缺省删最后一个) |
|
|
126
121
|
| `runChannelAction(actionId, options?)` | 执行右键交互框里的动作:`select-group` / `deselect-group` / `add-waypoint` / `remove-waypoint` / `split` / `merge`(`options` 带 `channelId` / `groupId` / `coordinate` / `pathIndex` / `size`),返回执行之后的上下文 |
|
|
127
|
-
| `beginAddChannel(options?)` | 进入「新增通道」:点第一个节点当起点,一条线跟随光标,点第二个节点出方案;`options` 支持 `kind`(`'channel'` 新建通道 / `'line'` 新建独立线路,缺省 `'channel'`)/ `circuits`(一次加几条,缺省 1)/ `autoCommit` / `continuous` / `chain` / `name` / `lineId` / `lineProps` / `lineItems`(第二段,连同线路一起新建)/ `channelProps` / `handoff`(交接模式:ready 发完收起草稿,自己调 `addChannel` 落地)/ `select`(点中的节点顺手选中),见「新增通道」 |
|
|
122
|
+
| `beginAddChannel(options?)` | 进入「新增通道」:点第一个节点当起点,一条线跟随光标,点第二个节点出方案;`options` 支持 `kind`(`'channel'` 新建通道 / `'line'` 新建独立线路,缺省 `'channel'`)/ `circuits`(一次加几条,缺省 1)/ `autoCommit` / `continuous` / `chain` / `name` / `lineId` / `lineProps` / `lineItems`(第二段,连同线路一起新建)/ `routing`(`'straight'` / `'orthogonal'`)/ `path`(中间拐点)/ `channelProps` / `channelDraftStyle`(本次草稿的预览样式)/ `handoff`(交接模式:ready 发完收起草稿,自己调 `addChannel` 落地)/ `select`(点中的节点顺手选中),见「新增通道」 |
|
|
128
123
|
| `getAddChannelDraft()` | 当前新增通道草稿(两个节点的信息与可选方案),没有草稿时为 `null` |
|
|
124
|
+
| `updateAddChannelStyle(patch?)` | 字段级合并当前草稿的预览样式(`color` / `width` / `dot` / `dotColor` / `arrow` / `arrowSize` / `arrowPositions` / `arrowReverse` / `arrowColor` / `circuitSpacing` / `opacity` / `customDraw`);传 `null` 回到全局 `channelDraftStyle`,没有草稿时什么也不做 |
|
|
129
125
|
| `continueAddChannel(options?)` | 开下一段草稿:连续模式落地时内部自动调(发 `phase: 'restart'`),也可以手动调;草稿已经退出时按 `options` 重新进来 |
|
|
130
126
|
| `cancelAddChannel()` | 取消新增通道(草稿期间按 Esc 等价,会补一条 `phase: 'cancel'`) |
|
|
131
127
|
| `endAddChannel()` | 结束新增通道:静默收掉视图上的示例假通道 / 线路(不补 `cancel` 事件),数据一个字节都不改 —— 结束事件里决定「不新建了」就用它 |
|
|
132
|
-
| `commitAddChannel(resolution?, options?)` | 把草稿按方案落到数据上:`resolution` 缺省用草稿里的推荐方案
|
|
128
|
+
| `commitAddChannel(resolution?, options?)` | 把草稿按方案落到数据上:`resolution` 缺省用草稿里的推荐方案 |;草稿里的 `routing` / `path` 会一起交给落地
|
|
133
129
|
| `getChannelAddOptions(from, to, count?, kind?)` | 两个节点之间的新增方案:新通道 / 新分组 / 并进某一组 / 无法添加;`count` 是这一次要加的回数(余量按它判),`kind: 'line'` 时方案表为空(独立线路不挑方案) |
|
|
134
130
|
| `getChannelBetween(from, to)` | 两个节点之间的通道读数(只读):有通道时 `hasChannel: true`,`channelId` / `channelIndex` / `groupCount` / `currentGroupId` 与 `groups` / `group` / `channel`(id / name / lineIds / 分组明细)都给全;没有通道时 `hasChannel: false`、`channel: null`、`groups: []`,端点认不出来返回 `null` —— 与 `getChannelAddOptions` 的读数同一份,界面做「这两个点之间已经有通道 / 有几组」的判断用它,不必算方案表 |
|
|
135
131
|
| `addChannel(spec, lineData?, group?)` | 程序化新增通道(新签名,只新建):第一段通道信息(`from` / `to` / `name` / `id` / `path` 等通道字段),第二段线路数组 line_data —— 一条或一批(字符串 / 数字按 id 认),**按每项 id 建 `lineIds`**,第三段可选分组信息(`{ id?, lineIds?, path? }`,单个 / 一组一个)—— **第二段 / 第三段显式给了**才走这条新路;两个节点之间已经有通道时整条失败(`reason` 指路下面两条)。旧写法 `addChannel(input, lineItems?)`(带 `circuits` / `resolution` / `channelId` / `groupId` / `groupIndex` / `kind`,或只写 `{ from, to }`)照样认:按方案表新建或并进已有通道,第二段 `lineItems` 给了几条就建几条 |
|
|
136
132
|
| `addChannelGroupLines(channelId, lineData, groupInfo?)` | 给已有通道**新加一组**回线(原 `addChannel` 的 `newGroup` 那一支):第二段线路数组 line_data 按每项 id 建回线,`groupInfo`(`{ id?, path? }`)给新分组的 id 与中间拐点,缺省 `${通道 id}::N`、不带拐点;通道 / 线路认不出来时 `ok: false` + `reason` |
|
|
137
133
|
| `addChannelGroups(channelId, groups, options?)` | 给已有通道**一次新加多组**回线:`groups` 每项 `{ id?, path?, lineData \| lines \| lineItems }`,线路数据与 `addChannel` 第二段同一份写法;逐组落地但**只记一步历史、只发一条** `addChannelGroups` 数据变更,返回 `{ ok, reason, count, results, lineIds, groupIds, groups }`,`options.emit: false` 只落地不通知 |
|
|
138
134
|
| `joinChannelGroupLines(channelId, groupId, lineData)` | 把新回线**并进已有通道的某一组**(原 `addChannel` 的 `joinGroup` 那一支):第二段线路数组 line_data,`groupId` 认分组 id 也认序号(从 0 起、按声明顺序),不传就挑第一个还有余量的分组 |
|
|
139
|
-
| `addChannels(input, options?)` | `addChannel` 的批量版:一次新增多条通道 /
|
|
140
|
-
| `addLine(input, lineItems?)` | 程序化新增独立线路:等价于 `addChannel({ ...input, kind: 'line' })`,只往 `lines` 里加、不碰任何通道(`resolution: 'newLine'` 也认);第二段 `lineItems` 同样认
|
|
135
|
+
| `addChannels(input, options?)` | `addChannel` 的批量版:一次新增多条通道 / 独立线路(每条是新签名或旧写法,逐条各自认;每项的 `routing` / `path` 走同一套解析,`path` 是中间拐点),逐条落地但**只重排一次场景、只记一步历史、只发一条** `addChannels` 数据变更;返回 `{ ok, count, results, lineIds, channelIds, items }`,失败条目在各自的 `reason` 里说明原因、不影响其余条目,`options.emit: false` 时不发 `onDataChange`,见「动态换数据与加载完成」 |
|
|
136
|
+
| `addLine(input, lineItems?)` | 程序化新增独立线路:等价于 `addChannel({ ...input, kind: 'line' })`,只往 `lines` 里加、不碰任何通道(`resolution: 'newLine'` 也认);第二段 `lineItems` 同样认 |;`routing: 'orthogonal'` 自动正交折线,`path` 是中间拐点,落地成含两端的完整折线
|
|
141
137
|
| `addPoint(item, options?)` / `addPoints(items, options?)` / `addLines(items, options?)` | 把**现成的数据对象**追加到末尾(批量导入、从别处拷过来、按坐标补几条):老数据一条不动,返回 `{ ok, count, indexes, items }`(`addPoint` 另有单条的 `index` / `item`),`options.emit: false` 时不发 `onDataChange`;与 `addChannel` / `addLine` 的分工是后者走「通道 / 草稿」那一套 |
|
|
142
138
|
| `removeLine(lineId)` | 移除一条线路(撤销刚落地的新增线路):挂在通道上的回线会从通道声明里一起摘掉,通道空了整条删掉,返回 `{ ok, line, lineId, index, channelId, removedChannel }` |
|
|
143
139
|
| `removeLines(lineIds)` | 一次移除多条线路(传数组或单条 id):通道声明与分组跟着收拾、删空的通道整条走,返回 `{ ok, lineIds, indexes, lines, entries, removedChannels }` |
|
|
144
140
|
| `removeChannel(channelId)` | 移除整条通道:它名下的回线一条条摘掉,返回 `{ ok, channelId, lineIds, lines, removedChannel }` |
|
|
145
|
-
| `updatePoint(id, patch)` / `updateLine(id, patch)` / `updateChannel(id, patch)` | 定向更新一个节点 / 线路 /
|
|
141
|
+
| `updatePoint(id, patch)` / `updateLine(id, patch)` / `updateChannel(id, patch)` | 定向更新一个节点 / 线路 / 通道并重渲染:单项字段(尺寸、图标、颜色、线宽、通道宽度 / 名称等)直接写补丁;只重排受影响的那一小片(节点 → 绑定线与锚定通道(尺寸 / 图标换过时,锚定通道的宽度一起按新尺寸重排,见「通道与多回线」),线路 → 这一条,通道 → 它的分组与成员),其余要素与缓存一个字节都不动;节点的 `visible: false` / 改回来会走一次整份重排(这一条要连绑定线、锚定通道与拾取索引一起退场 / 排回去,定向更新那条路落不下;同一个 `batch()` 里改一批只重排一次);`updateLine` 的补丁里还能写 `groupId` / `groupIndex`(可配 `channelId`)顺带把这条回线挪到目标分组,`updateChannel` 写 `groups` / `lineIds` 会顺带改分组并补一条 `channelGroups` 变更(见「通道分组」);`updateChannel` 还能给第三段 `linePatches`(一条或一批 `{ id \| index, ...字段 }`)把「通道声明 + 成员回线各自的字段 / 分组」一次下发 —— 声明先落、再逐条走 `updateLine`,整次调用只发一条 `batch` 数据变更、历史里只算一步(见「通道分组」与「逐方法示例」);第三段里认不出的成员 id 带得起定义(`from` / `to` 两端可解析、可用的 `path`、或通道自己声明了两端)会当场建一条回线并挂进通道,给不出定义才跳过点名;`updateLine` 的**拐点**写在 `path` 上(整条折线,含首尾端点 —— 只写中间拐点用 `setLineWaypoints(id, coordinates)`),通道里的回线几何由通道骨架推导(`path` 写了也会被覆盖),改它走 `setLineWaypoints` / `setChannelPath` |
|
|
146
142
|
|
|
147
|
-
| `
|
|
143
|
+
| `setFeatureVisible(kind, refs, visible)` / `hideFeatures(kind, refs)` / `showFeatures(kind, refs)` | 统一隐藏 / 显示节点、线路或通道:只改数据里的 `visible`,不删要素,分组 / 拐点 / 编辑状态都保留。`kind` 收 `point` / `line` / `channel`,`refs` 收单个或一批 id / 下标 / `{ id }` / `{ index }`,也认 `'selection'`(通道按选中回线的归属取整条);`hideFeatures` / `showFeatures` 是 `false` / `true` 的快捷写法。整次调用收成一条历史与一条 `batch` 数据变更,返回 `{ ok, reason, kind, visible, indexes, ids, items, skipped }`;认不出的引用逐条进 `skipped`,不影响其余条目 |
|
|
148
144
|
| `movePoint(id, coordinate)` / `movePoint(id, x, y)` | 挪一个节点:`{ x, y }` / `[x, y]` / 两个数字都认;绑在它身上的线路端点与以它为锚点的通道骨架跟着重排(与拖动落地同一条路) |
|
|
149
|
-
| `setLineWidth(id, width)` / `setLineColor(id, color)` | 只改一条线路的线宽 / 颜色 |
|
|
150
145
|
| `setLineWaypoints(id, coordinates)` | 整份换一条线路的拐点:**只写中间拐点**(不含首尾两端;传单个坐标 = 只留一个拐点,空数组 = 拉直)。两端按节点 / `start` / `end` 补齐(绑了 `from` / `to` 时两端始终按节点坐标走),存回 `lines[].path` 的是「首尾端点 + 中间顶点」那一份;只插一个用 `addWaypoint(id, coordinate)`,删一个用 `removeWaypoint(id, pathIndex)`;通道里的回线改的是它所在分组的骨架(与 `setChannelPath` 同一份声明) |
|
|
151
146
|
| `getLineDecorations(id)` / `setLineDecorations(id, list)` / `addLineDecoration(id, decoration)` / `updateLineDecoration(id, index, patch)` / `removeLineDecoration(id, index)` | 线路上标记(图片 / SVG 装饰)的读写:`get` 给副本(要素没找到给空数组),`set` 整份换(空数组 = 全摘掉),`add` 追加在末尾并返回加进去的那一条,`update` / `remove` 按 `decorations` 的顺序数(返回改动的那一条,要素或下标找不到时给 `null` 并记一条 warning);四个写方法各只发一条数据变更、只落一步历史 |
|
|
152
|
-
| `
|
|
153
|
-
| `
|
|
154
|
-
| `setChannelLineWidth(id, width)` / `setChannelColors(id, colors)` / `setChannelPath(id, coordinates)` | 只改一条通道的回线线宽 / 逐回线颜色 / 骨架拐点:前两个把**成员回线连同通道声明**一起改(一次 `batch`,只发一条数据变更、只落一步历史),颜色不够时按顺序循环取、只给一个就整条通道一个色(改**单条回线**的颜色用 `
|
|
147
|
+
| `getPointDecorations(id)` / `setPointDecorations(id, list)` / `addPointDecoration(id, decoration)` / `updatePointDecoration(id, index, patch)` / `removePointDecoration(id, index)` | 节点上标记(图片 / SVG 装饰)的读写:`get` 给副本(节点没找到给空数组),`set` 整份换(空数组 = 全摘掉),`add` 追加在末尾并返回加进去的那一条,`update` / `remove` 按 `points[].decorations` 的顺序数(返回改动的那一条,节点或下标找不到时给 `null`);四个写方法各只发一条数据变更、只落一步历史。节点装饰可写屏幕像素偏移(`offset` 或 `distance` + `direction`)、固定世界坐标(`anchor: 'fixed'` / `at`),并可用 `connector` 从节点中心画连接线 |
|
|
148
|
+
| `beginDecorationDraft(options?)` / `getDecorationDraft()` / `updateDecorationDraft(patch?)` / `commitDecorationDraft(overrides?)` / `cancelDecorationDraft(options?)` | 动态装饰器草稿:`target` 取 `'line'`(缺省)/ `'point'` / `'both'`,指针移到线路 / 回线或节点上就画临时装饰,移出立即收掉;`both` 按屏幕距离取更近者、等距优先节点,最近目标被白名单或上限拦住时尝试另一类。线路按 `scope`(`line` 单条 / `group` 同组 / `channel` 整条通道,非通道线退回单条)展开;节点侧 `placement` 只选位置来源(`offset` 相对偏移 / `fixed` 固定坐标 / `pointer` 鼠标位置),`anchor` 再选落地关系(`follow` 保存相对节点的屏幕偏移 / `fixed` 保存世界坐标),两者可自由组合,缺省按 `offset → follow`、`fixed / pointer → fixed` 推导。`allowedLines` / `allowedChannels` / `allowedGroups` / `allowedPoints` 与 `maxPerLine` / `maxPerPoint` 在悬浮与提交两处拦截,`allowDuplicate: false` 时按 `duplicateDistance` 检测同位置重复,`duplicateStrategy` 选 `offset` 自动避让或 `reject` 直接拦住。左键在目标上松开发 `ready`,空白处不发;`get` 取当前载荷,`update` 边交互边改图标 / 大小 / 方向 / 范围 / 位置来源 / 落地关系;`commit` 把线路与节点目标放在同一个 `batch` 里写入(一次 `dataChange`、一条历史),`cancel` 只清假装饰(Esc / 右键等价),数据与历史一个字节不动 |
|
|
149
|
+
| `setChannelLineWidth(id, width)` / `setChannelColors(id, colors)` / `setChannelPath(id, coordinates)` | 只改一条通道的回线线宽 / 逐回线颜色 / 骨架拐点:前两个把**成员回线连同通道声明**一起改(一次 `batch`,只发一条数据变更、只落一步历史),颜色不够时按顺序循环取、只给一个就整条通道一个色(改**单条回线**的颜色用 `updateLine(id, { color })`,不必走整条通道的批量写法);`colors` 传字符串或字符串数组,`setChannelPath` 只写中间拐点(两端由节点坐标补齐);分过组的通道写第一组的声明(`groups[].path` 优先于顶层 `path`;「第一组」跳过 `lineIds` 空的分组声明 —— 引擎会把这种组整组丢掉),要改别的组用 `updateChannel(id, { groups })` |
|
|
155
150
|
| `getParallelGroups()` | 新增拐点集合:被加过 / 拖过拐点的通道与线路,结构与 `test.json` 的 `parallel_groups` 一致 |
|
|
156
|
-
| `setFilter(filter \| null)`
|
|
151
|
+
| `setFilter(filter \| null)` | 设置或清空筛选条件(传 `null` 清空):完整格式 `{ points, lines, cascade, worker }`,只筛节点时可以简写成节点条件本身;见「筛选」 |
|
|
157
152
|
| `getFilter()` / `getFilterResult()` | 当前条件与最近一次结果:隐藏的点 / 线下标、可见数量、是否用了 Worker、耗时 |
|
|
158
153
|
| `getVisibleData()` | 过滤之后的数据副本(`points` / `lines`) |
|
|
159
154
|
| `getMovedPoints()` | 位置对账:相对上次对账(建视图 / 整份换数据 / 上一次 `clearMovedPoints`)位置变过的节点,按 id 去重、一趟扫出 `[{ index, id, x, y, item }]` —— 拖动 / `updatePoint` / `patchPoints` / 撤销都算,`removePoints` 删掉的记录顺手清掉,见「节点位置对账」 |
|
|
160
155
|
| `clearMovedPoints(refs?)` | 位置对账:把当前坐标记成新基准(发完接口告诉组件「这些已经同步过了」):不传 / `null` 全部对账,传一个或一批(写法与 `removePoints` 一致)只清这些,认不出来的跳过并记一条提醒;返回实例本身 |
|
|
156
|
+
| `getChangedChannels(options?)` | 通道变化对账:相对上次对账(建视图 / 整份换通道声明 / 上一次 `clearChangedChannels`)成员、分组、拐点、端点、可见性或其余声明字段变过的通道。每项带当前 `groups` 快照、六个 `*Changed` 标记、`fields` 与 `reasons`;新加通道只补账不报变化,删掉的通道(含 `removeLines` 连带删除)从账本清掉。`options.reasons` 只取指定原因(空数组直接返回空表),`options.ignoreGroups` 忽略分组新增 / 删除 / 重排、仍报已有分组的拐点变化。节点拖动只改坐标、不改 `from` / `to`,因此不算端点变化;拖 / 加 / 删分组拐点会进 `waypoints`,见「通道变化对账」 |
|
|
157
|
+
| `clearChangedChannels(refs?)` | 通道变化对账:把当前声明记成新基准(发完接口告诉组件「这些已经同步过了」):不传 / `null` 全部对账,传一个或一批(写法与 `removePoints` 一致)只清这些,认不出来的跳过并记一条提醒;返回实例本身 |
|
|
158
|
+
| `getChangedLines(options?)` | 线路变化对账:相对上次对账(建视图 / 整份换线路 / 上一次 `clearChangedLines`)`path` / `start` / `end`、`from` / `to`、可见性或其余声明字段变过的线路。每项带 `{ index, id, item, path, start, end, from, to, visible, pathChanged, endpointsChanged, visibilityChanged, fieldsChanged, fields, reasons }`;`options.reasons` 可写 `path` / `endpoints` / `visibility` / `fields`。新加线路只补账不报,删除线路(含 `removeChannel` 连带删除)同步清账;通道骨架变化不算线路变化,见「线路变化对账」 |
|
|
159
|
+
| `clearChangedLines(refs?)` | 线路变化对账:不传 / `null` 全部对账,传一个或一批(写法与 `removePoints` 一致)只清这些,空数组无操作;认不出来的跳过并记一条提醒,返回实例本身 |
|
|
161
160
|
| `isPointVisible(index)` | 某个下标的节点当前在不在图上:被筛选 / `visible: false` 隐藏掉的不算,初始化发散渲染还没排到的那部分也不算 |
|
|
162
161
|
| `resize()` / `refresh(options?)` | 手动同步尺寸 / 重新应用配置并重绘(`refresh({ reflow: false })` 只重画一帧,不重解析数据与配置);容器尺寸或祖先的 `transform: scale` 变过之后要调一次 `resize()` 同步(CSS `zoom` 会自己感知) |
|
|
163
162
|
| `destroy()` | 销毁引擎并移除根节点 |
|
|
@@ -177,16 +176,19 @@
|
|
|
177
176
|
| `clearHistory()` | 清空历史(撤销与重做两份栈一起),返回清掉的条数 |
|
|
178
177
|
| `batch(fn, options?)` | 批量更新:回调里对 `updatePoint` / `updateLine` / `updateData` 的连续改动收成一条 `onDataChange`(`type: 'batch'`,`changes` 按调用顺序列出每一步)与一步历史,`options.label` 给这一步起名;收尾时筛选只重算一次、标签重排 / 提示框 / 鹰眼图各补一次(`onFilter` 也只发一条),可以嵌套(只有最外层收尾),见「批量更新」 |
|
|
179
178
|
| `getQuality()` / `setQuality(next)` | 读当前画质读数 `{ mode, name, level, glow, ornament, scale, budgetMs, frameMs }` / 换一档(`'high'` / `'balanced'` / `'lean'` / `'fast'` / `'auto'` 或 `{ mode, budgetMs, minScale }`),换完发一条 `onQualityChange`,见「画质」 |
|
|
180
|
-
| `
|
|
179
|
+
| `updateOptions({ effects })` / `getEffects()` | 换 / 读动画效果的全局配置(`effects: false` 就是一处关掉):`getEffects()` 给 `{ enabled, respectReducedMotion, line, point }`,其中 `enabled` 是**运行时口径**(只在数据里逐条配了 `effect` 时也是 `true`),见「动画效果(effects)」 |
|
|
181
180
|
| `getLineEffects()` | 这一帧动点的读数 `{ lineIndex, slot, x, y, angle, total, size }`(世界坐标 + 朝向 + 所在线路 + 沿线总长):自建覆盖层(跟着图标走的标签 / 提示)与读数面板用它,没动的时候是空表 |
|
|
182
181
|
| `getPointEffects()` | 这一帧涟漪的读数 `{ index, x, y, color, radius, count, period, from }`(世界坐标 + 颜色 + 圈数 + 周期):自建覆盖层与自测用它;拖动就地挪过圈之后读到的就是挪完的位置,没配涟漪那些节点不在表里 |
|
|
183
182
|
| `getPrebake()` / `runPrebake()` | 预热读数(这次配了哪些符号 / 颜色 / 尺寸 / 逐组合,没配是 `null`)/ 按当前配置再烤一遍并返回组合条数,见「贴图符号预热(prebake)」 |
|
|
184
183
|
| `getSymbolCombos()` | 收出这份数据真正会用到的贴图组合 `{ combos, symbols, pointColors, sizes, lineColors }`:喂给 `prebake.combos` 就是不重不漏的一份(一条一张、逐条命中),见「贴图符号预热(prebake)」 |
|
|
185
184
|
| `el` / `canvas` / `gl` | 根节点、画布元素与 WebGL2 上下文 |
|
|
185
|
+
| `requestRender()` | 请求重画一帧:WebGL 自定义层的数据源变了、组件自己不知道时调用;返回实例本身 |
|
|
186
|
+
| `addWebGLLayer(layer)` | 加一个 WebGL 自定义层(同 id 覆盖),返回卸载函数;`draw` 拿 `gl` / `canvas` / `viewport` / `camera` / `frame` / `project` / `unproject` / `requestRender`,在内置内容之后绘制 |
|
|
187
|
+
| `updateWebGLLayer(id, patch)` / `removeWebGLLayer(id)` / `clearWebGLLayers()` / `getWebGLLayers()` | 改 / 删 / 清空 / 读自定义层;`order` 小的先画,同 `order` 保持加入顺序,`enabled: false` 跳过,层不参与拾取与导出 |
|
|
186
188
|
|
|
187
189
|
返回 `this` 的方法都可以链式调用;返回其它值的方法(`get*` / `list*` / `export*` / `search` / `pick*` / `add*` / `remove*` / `copy*` / `merge*` / `locate*` 这些)在下面的「参数速查」里都标了返回类型。
|
|
188
190
|
|
|
189
|
-
**怎么确认「组件到底有哪些属性和方法」**:上面那张表按功能分组介绍,下面的「参数速查」把实例的**每个成员逐个列全**(当前
|
|
191
|
+
**怎么确认「组件到底有哪些属性和方法」**:上面那张表按功能分组介绍,下面的「参数速查」把实例的**每个成员逐个列全**(当前 249 个:246 个方法 + `el` / `canvas` / `gl` 三个属性),`options` 表列全 91 个键,数据字段表列全 242 个字段。这三份清单不靠手抄 —— 它们直接对着源码与类型对账:
|
|
190
192
|
|
|
191
193
|
- `node docs/steps/gen-api-index.mjs`:从 `create.js` 的实例定义、本文档的两张表与 `types.d.ts` 生成 `docs/demos/api-index.js`(`API_SUMMARY` / `API_SECTIONS` / `API_OPTIONS`),demo 的「实例 API」面板读的就是它;带 `--check` 时只校验有没有过期。
|
|
192
194
|
- `node docs/steps/check-doc-coverage.mjs`:10 项双向对账 —— 实例成员 × 文档 / × 参数速查 / × 类型、参数速查与实例方法主表各自反查过期条目、类型反查过期声明、数据字段 × 文档、options 键 × 文档 / options 表反查过期字段、demo 清单是否最新。加一个实例成员、改一个 options 键而没同步文档时,这个脚本会直接报出来。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 17 参数速查(逐个方法)
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> 241 个成员逐个列全:参数、默认值与返回。
|
|
4
4
|
|
|
5
5
|
### 参数速查(逐个方法)
|
|
6
6
|
|
|
@@ -17,10 +17,7 @@
|
|
|
17
17
|
| `updateLineStyle(patch)` | `patch: GisViewLineStyle \| null` 线的一份,口径与 `updatePointStyle` 完全一致 | `this` |
|
|
18
18
|
| `getOptions()` | 无 | `GisViewOptions` |
|
|
19
19
|
| `getData()` | 无 | `GisViewData` |
|
|
20
|
-
| `updateData(points, lines, channels?)` | 整份换数据:`points?: GisViewPoint[]` 新的节点数组(不传就不动);`lines?: GisViewLine[]` 新的线路数组(不传就不动);`channels?: GisViewChannel[]` 给了就连通道声明一起换(切场景一次换完、只发一条 `dataChange
|
|
21
|
-
| `updateChannels(channels)` | `channels?: GisViewChannel[]` 通道声明的替换值(回线怎么分组、骨架拐点在哪);省略等于清空。场站与回线数据一个都不动,引擎按新声明重排一遍。与 `updateChannel(id, patch)` 的分工:那一条按 id 给某一条打补丁(定向),这一条是全换;声明里的 `lineIds` 同样是成员整表 —— 与 `groups` 冲突时按它收窄(与 `updateChannel` 的补丁同一份口径);声明里没写分组 id 时引擎按「单组用通道 id、多组 `通道id::1` / `通道id::2`…」补,并把最终分组(含拐点路径)与对齐后的成员表写回数据副本;认不出的成员 id、重名的分组 id(写回前按调用方的声明查)各报一句 `onWarning` | `this` |
|
|
22
|
-
| `updatePoints(points)` | `points: GisViewPoint[]` 整份节点的替换值(省略等于清空) | `this` |
|
|
23
|
-
| `updateLines(lines)` | `lines: GisViewLine[]` 整份线路的替换值(省略等于清空) | `this` |
|
|
20
|
+
| `updateData(points, lines, channels?)` | 整份换数据:`points?: GisViewPoint[]` 新的节点数组(不传就不动);`lines?: GisViewLine[]` 新的线路数组(不传就不动);`channels?: GisViewChannel[]` 给了就连通道声明一起换(切场景一次换完、只发一条 `dataChange`)。也收单对象写法 `updateData({ points, lines, channels })`(只换给出的那几列;只换通道声明写 `updateData({ channels })`);接口字段先在调用方映射成这三列,见「动态换数据与加载完成」 | `this` |
|
|
24
21
|
| `importData(input, options = {})` | `input: GisViewDocumentInput`:标准文档(`format: 'gis-view'`)/ 与创建入参同构的数据对象(`points` / `lines` / `channels` / `labelStates` / `view` / `filter`,给哪列出哪列)/ 节点数组;`options` 可以把某一列(`points` / `lines` / `channels` / `labelStates` / `view` / `filter`)显式点上,`checkKeys: false` 不点名多余的顶层键 | `GisViewImportResult` |
|
|
25
22
|
| `updatePoint(id, patch)` | `id: string \| number` 节点 id;`patch: Partial<GisViewPoint>` 要合并的字段(写 `x` / `y` 就是移动,写 `null` 摘掉这一项;写 `visible: false` 把这一条从图上收起、写 `visible: true` 排回来 —— 这一条要连绑定线 / 锚定通道一起重排,因此走整份重推一次,`batch()` 里一批只推一次) | `this` |
|
|
26
23
|
| `updateLine(id, patch)` | `id` 线路 id;`patch: GisViewLinePatch` 要合并的字段(`path` / `from` / `to` / `color` / `width` / `labels`… 都能改),还能写三个「分组指令」:`groupId`(或 `groupIndex`,可配 `channelId`)把这条回线挪到目标分组 —— `groupId: 'newGroup'` 单独拆一组、其余按现有分组 id 并组,走的是 `moveChannelLine` 那一套;三个字段只是指令,不会写进线路数据、不会出现在 `updateLine` 的载荷里,挪组成功会先发一条 `channelGroups` 变更(只给指令时这次调用就只发它);**拐点**写在 `path` 上(整条折线,含首尾端点 —— 只写中间拐点用 `setLineWaypoints(id, 中间拐点)`),通道里的回线几何由通道骨架推导(`path` 写了也会被覆盖,改它走 `setLineWaypoints` / `setChannelPath`) | `this` |
|
|
@@ -69,7 +66,6 @@
|
|
|
69
66
|
| `getQuality()` | 无 | `GisViewQualityState` |
|
|
70
67
|
| `setQuality(next)` | `next: GisViewQualityOptions` 新档位:`'high'` / `'balanced'` / `'lean'` / `'fast'` / `'auto'`,或 `{ mode, budgetMs, minScale }` | `GisViewQualityState` |
|
|
71
68
|
| `getEffects()` | 无 | `GisViewEffectsReadout`:`{ enabled, respectReducedMotion, line, point }`,`enabled` 是**运行时口径**(数据里逐条配了 `effect` 时也是 `true`) |
|
|
72
|
-
| `setEffects(next)` | `next: GisViewEffectsInput` 与 `options.effects` 同一套写法(`false` = 一处关掉) | `this` |
|
|
73
69
|
| `getLineEffects()` | 无 | `GisViewLineEffectReadout[]`:这一帧算过位置的动点 `{ lineIndex, slot, x, y, angle, total, size }`(世界坐标 + 朝向),没动的时候是空表 |
|
|
74
70
|
| `getPointEffects()` | 无 | `GisViewPointEffectReadout[]`:这一帧涟漪的读数 `{ index, x, y, color, radius, count, period, from }`(世界坐标 + 颜色 + 圈数 + 周期),没配涟漪时是空表 |
|
|
75
71
|
| `getPrebake()` | 无 | `GisViewPrebakeReadout \| null`:这次配了哪些符号 / 颜色 / 尺寸 / 逐组合 |
|
|
@@ -103,9 +99,8 @@
|
|
|
103
99
|
| `getContextAt(x, y, options?)` | `x` / `y` 画布 CSS 像素;`options?: GisViewContextAtOptions`:`selection: false` 不整理选中集、`lngLat: false` 不换算经纬度(dragover / 自绘十字线这类每帧来的场合用它省分配) | `GisViewContextAtResult`;给了选项时是 `GisViewContextAtLightResult`(没要的那几项不再生成) |
|
|
104
100
|
| `nearestPointsAt(x, y, options?)` | `x` / `y` 画布 CSS 像素;`options?: GisViewNearestOptions`:`limit`(最多几个,缺省 1)、`maxDistance`(**屏幕像素**上限,缺省不限)、`withScreen: true` 补屏幕坐标 | `GisViewNearestPoint[]`,按距离从近到远:`{ index, item, x, y, radius, distance, distancePx, screen? }`;内部走点网格,十万级数据也只碰光标附近的单元格 |
|
|
105
101
|
| `nearestLineAt(x, y, options?)` | `x` / `y` 画布 CSS 像素;`options?: GisViewNearestLineOptions`:`maxDistance`(**屏幕像素**,缺省 40,超出算没命中)、`editableOnly: true` 只看允许加拐点的线、`withScreen: true` 补屏幕坐标 | `GisViewNearestLine \| null`:`{ index, item, path, distance, distancePx, position, channelId?, groupId?, channelIndex?, screen? }`,`position` 是落点投到线上的沿线比例(0~1),加拐点 / 挂装饰直接当 `position` 用;附近没线返回 `null` |
|
|
106
|
-
| `setDropPreview(preview)` | `preview: GisViewDropPreviewInput \| null`:`kind`(`'point'` / `'line'` / `'channel'` / `'waypoint'` / `'decoration'` / `'label'`,缺省按 `item` 推断)、`screen`(画布 CSS 像素)或 `world`(世界坐标)至少给一个、`item` 是**准备落地的那一份字段**(与 `addPoint` / `addLine` 同一份)、`from`(line / channel 的起点);传 `null`
|
|
102
|
+
| `setDropPreview(preview)` | `preview: GisViewDropPreviewInput \| null`:`kind`(`'point'` / `'line'` / `'channel'` / `'waypoint'` / `'decoration'` / `'label'`,缺省按 `item` 推断)、`screen`(画布 CSS 像素)或 `world`(世界坐标)至少给一个、`item` 是**准备落地的那一份字段**(与 `addPoint` / `addLine` 同一份)、`from`(line / channel 的起点);传 `null` 清掉预览 | `GisViewDropPreview \| null` 解析后的读数 `{ kind, screen, world, size, styleSize, radius, color, strokeColor, strokeWidth, opacity, symbol, width, dashed }`:走的是与真实要素完全相同的样式链(规则 -> 全局样式 -> 这一份字段),`styleSize` 与落地后 `getPointStyle().size` 是同一个数(`size` 是这一刻画出来的宽度,不悬停 / 不选中时两者相同) |
|
|
107
103
|
| `getDropPreview()` | 无 | `GisViewDropPreview \| null`:当前拖拽落点预览的读数,没有预览时 `null` |
|
|
108
|
-
| `clearDropPreview()` | 无 | `this`(与 `setDropPreview(null)` 同一条路) |
|
|
109
104
|
| `getPoint(ref)` | `ref: GisViewFeatureRef` 节点定位:id、下标、`{ id }` / `{ index }` | `GisViewPointInfo \| null` |
|
|
110
105
|
| `getPointStyle(index)` | `index: number` 节点下标 | `GisViewPointStyleSnapshot \| null`:节点解析后的样式快照 `{ index, size, symbol, zIndex }`,`size` / `symbol` 取样式链(节点自身 > 规则 > `pointStyle`)定下来的那一份,含 `sizeScale`、不含悬停 / 选中样式与热力倍率;落点预览的读数与它同源 |
|
|
111
106
|
| `getLine(ref)` | `ref` 线路定位(同上) | `GisViewLineInfo \| null` |
|
|
@@ -116,6 +111,13 @@
|
|
|
116
111
|
| `getVisibleData()` | 无 | `GisViewData` |
|
|
117
112
|
| `getMovedPoints()` | 无 | `GisViewMovedPoint[]`:相对上次对账位置变过的节点(`index` / `id` / `x` / `y` / `item`),按 id 去重;被删掉的记录不在里面(顺手清掉) |
|
|
118
113
|
| `clearMovedPoints(refs?)` | `refs?: GisViewFeatureRef \| GisViewFeatureRef[]` 记成新基准的节点(id / 下标 / `{ id }` / `{ index }`,写法与 `removePoints` 一致);不传 / `null` 全部对账,空数组无操作 | `this` |
|
|
114
|
+
| `getChangedChannels(options?)` | `options?: GisViewChangedChannelOptions`:`reasons?: GisViewChangedChannelReason[]` 只返回这些原因(`[]` = 空表);`ignoreGroups?: boolean` 忽略分组新增 / 删除 / 重排,只比较共有分组的拐点 | `GisViewChangedChannel[]`:相对上次通道对账变了哪些通道,每项给 `{ index, id, item, groups, groupsChanged, waypointsChanged, membersChanged, endpointsChanged, visibilityChanged, fieldsChanged, fields, reasons }`;筛选后 `*Changed` 标记与 `fields` 同步收窄,读本身不改基准 |
|
|
115
|
+
| `clearChangedChannels(refs?)` | `refs?: GisViewFeatureRef \| GisViewFeatureRef[]` 记成新基准的通道(id / 下标 / `{ id }` / `{ index }`,写法与 `removePoints` 一致);不传 / `null` 全部对账,空数组无操作 | `this` |
|
|
116
|
+
| `getChangedLines(options?)` | `options?: GisViewChangedLineOptions`:`reasons?: GisViewChangedLineReason[]` 只返回 `path` / `endpoints` / `visibility` / `fields` 中的指定原因(`[]` = 空表) | `GisViewChangedLine[]`:相对上次线路对账变了哪些线路,每项给 `{ index, id, item, path, start, end, from, to, visible, pathChanged, endpointsChanged, visibilityChanged, fieldsChanged, fields, reasons }`;新加只补账、删除清账,读本身不改基准 |
|
|
117
|
+
| `clearChangedLines(refs?)` | `refs?: GisViewFeatureRef \| GisViewFeatureRef[]` 记成新基准的线路(写法与 `removePoints` 一致);不传 / `null` 全部对账,空数组无操作 | `this` |
|
|
118
|
+
| `setFeatureVisible(kind, refs, visible)` | `kind: GisViewVisibilityKind`(`'point'` / `'line'` / `'channel'`);`refs: GisViewVisibilityRefs` 单个 / 一批 id 或下标,也认 `'selection'`(通道按选中回线的归属取整条);`visible: boolean` | `GisViewSetVisibilityOutcome`:`{ ok, reason, kind, visible, indexes, ids, items, skipped }`;只改数据的 `visible`,整次调用一条历史、一条 `batch` 数据变更 |
|
|
119
|
+
| `hideFeatures(kind, refs)` | 同上,等价于 `setFeatureVisible(kind, refs, false)` | 同上 |
|
|
120
|
+
| `showFeatures(kind, refs)` | 同上,等价于 `setFeatureVisible(kind, refs, true)`(隐藏后原样恢复) | 同上 |
|
|
119
121
|
| `isPointVisible(index)` | `index: number` 节点下标 | `boolean`。在不在图上(被筛选 / `visible: false` 或发散渲染还没铺到的都算 `false`) |
|
|
120
122
|
| `getElementBounds(keys)` | `keys: GisViewFeatureKey[]` 要素定位数组(`{ type, id }` / `{ type, index }` / 裸 id) | `GisViewBounds \| null` |
|
|
121
123
|
| `getViewState()` | 无 | `GisViewViewState` |
|
|
@@ -124,9 +126,8 @@
|
|
|
124
126
|
|
|
125
127
|
| 方法 | 参数(名字: 类型 = 默认值) | 返回 |
|
|
126
128
|
| --- | --- | --- |
|
|
127
|
-
| `
|
|
128
|
-
| `
|
|
129
|
-
| `deselect(refs = null)` | `refs?: GisViewSelectionRefs` 要取消的东西(写法与 `selectFeatures` 一致:节点 / 通道 / 线路 / 混合一批);不传 / `null` 等于取消全部(= `select(null)`),空数组是「没有目标」什么都不做 | `this` |
|
|
129
|
+
| `selectFeatures(refs, options = {})` | `refs: GisViewSelectionRefs` 要选中的东西:id / id 数组(多选)/ `{ type, index }` / 通道写法 / 拾取载荷 / 搜索命中,传 `null` / 空数组等于清空;`options?: GisViewSelectOptions` 只有 `mode`(`'replace'` 缺省 / `'add'` / `'toggle'` / `'remove'`) | `this` |
|
|
130
|
+
| `deselect(refs = null)` | `refs?: GisViewSelectionRefs` 要取消的东西(写法与 `selectFeatures` 一致:节点 / 通道 / 线路 / 混合一批);不传 / `null` 等于取消全部(= `selectFeatures(null)`),空数组是「没有目标」什么都不做 | `this` |
|
|
130
131
|
| `getSelections()` | 无 | `GisViewPickResult[]` |
|
|
131
132
|
| `isSelected(ref)` | `ref: GisViewFeatureRef \| GisViewFeatureKey \| GisViewSelectionRefObject` 要素定位(id / 下标 / `{ id }` / `{ index }` / `{ type, index }` / `{ item }`) | `boolean` |
|
|
132
133
|
| `getSelectionData()` | 无 | `GisViewSelectionData`:`{ ids, count, pointCount, lineCount, channelCount, points, lines, channels, items, pointIndexes, lineIndexes, bounds }`(`bounds` 是世界包围盒,空选中时 `null`) |
|
|
@@ -146,10 +147,9 @@
|
|
|
146
147
|
| `getPointClipboard()` | 无 | `GisViewClipboardItem \| null` |
|
|
147
148
|
| `mergePoints(source, target, options = {})` | `source: GisViewPointRef` 被并入的节点(并完就没了)、`target: GisViewPointRef` 接收的节点、`options?: { originalEvent?: Event \| null; item?: GisViewPoint }`:`item` 可以给一份已经改好的合并结果(确认阶段改过 `payload.item` 之后就是它) | `GisViewMergeOutcome` |
|
|
148
149
|
| `mergeSelectedPoints(options = {})` | `options: GisViewMergeSelectedOptions`:`target` 指定并到哪一个(不给就自动挑绑定线路最多的);`sources` 直接给来源(不依赖选中集);`item` 是最终节点补丁或 `(context) => 补丁`(上下文含 `item` / `merged` / `source` / `target` / `sourceIndex` / `targetIndex` / `merge` / `view`;坐标与 id 仍按 `target` 保留);`force: true` 越过 `mergeable: false`;`label` / `originalEvent` | `GisViewMergeSelectedOutcome` |
|
|
150
|
+
| `splitPoint(source, parts, options = {})` | `source: GisViewPointRef` 要拆的节点;`parts: GisViewSplitPointPart[]` 至少两份,每份可直接写节点字段或放进 `item`,并用 `lines` / `channels` / `channelFrom` / `channelTo` 分配线路与通道端点;`options?: GisViewSplitPointOptions`:`keepSourceId`(缺省 `true`,第一份沿用来源 id)/ `label` | `GisViewSplitPointOutcome`:`{ ok, reason, source, items, indexes, pointIds, linesChanged, removedLines, removedLineIds, removedLineIndexes, channelsChanged, removedChannels, removedChannelIds, skipped, changes }`;`changes` 可直接作为后端事务输入 |
|
|
149
151
|
| `getPointMerge()` | 无(载荷带 `impact`:`lineCount` / `linesChanged` / `removedLines` / `lineIds` / `removedLineIds` 与通道读数,确认前就能估算影响) | `GisViewPointMergePayload \| null` |
|
|
150
152
|
| `resolvePointMerge(confirmed, options = {})` | `confirmed?: boolean`(缺省 `true` = 确认,`false` = 取消);`options?: GisViewPointMergeConfirmOptions`:`keep` 选 `'target'`(缺省,保留碰撞目标)/ `'source'`(保留拖动的来源),`item` 是最终节点字段补丁(名称 / 分区 / 颜色 / 尺寸 / 图标 / 描边等;位置与 id 始终取保留端) | `GisViewPointMergePayload \| null` |
|
|
151
|
-
| `confirmPointMerge(options = {})` | `options?: GisViewPointMergeConfirmOptions`:与 `resolvePointMerge(true, options)` 同一份 `{ keep, item }`,用于拖拽合并确认时决定保留端并改写最终节点 | `GisViewPointMergePayload \| null` |
|
|
152
|
-
| `cancelPointMerge()` | 无(`resolvePointMerge(false)` 的别名;拖动的节点回原位,数据不动) | `GisViewPointMergePayload \| null` |
|
|
153
153
|
| `commitPointMerge()` | 无 | `boolean` |
|
|
154
154
|
| `revertPointMerge(options = {})` | `options?: { originalEvent?: Event \| null; silent?: boolean }`:`silent: true` 时不再补发一条 `cancel` 载荷 | `GisViewPointMergePayload \| null` |
|
|
155
155
|
| `removePoints(refs, options = {})` | `refs: \| GisViewFeatureRef \| 数组 \| 'all' \| 'selection' \| 'visible'` 要删哪些节点;`options?: { reason?: string }` 记进事件载荷的删除原因 | `GisViewRemovePointsOutcome` |
|
|
@@ -186,20 +186,21 @@
|
|
|
186
186
|
| `addChannelGroupWaypoint(channelId, groupId, coordinate)` | `channelId` 通道 id;`groupId` 分组 id;`coordinate` 新拐点世界坐标 | `this` |
|
|
187
187
|
| `removeChannelGroupWaypoint(channelId, groupId, pathIndex)` | `channelId` / `groupId` / `pathIndex` 要删的骨架顶点下标 | `this` |
|
|
188
188
|
| `runChannelAction(actionId, options?)` | `actionId: GisViewChannelActionId` 动作名(`'select-group'` / `'deselect-group'` / `'add-waypoint'` / `'remove-waypoint'` / `'split'` / `'merge'`,见 `getChannelContext().actions`);`options?: GisViewChannelActionOptions` 动作自己的参数(`groupId` / `lineId` / `coordinate`…) | `GisViewChannelContext \| null` |
|
|
189
|
-
| `beginAddChannel(options = {})` | `options?: GisViewChannelDraftOptions` 草稿配置:`kind` / `circuits` / `autoCommit` / `continuous` / `chain` / `name` / `lineId` / `lineProps` / `linePropsByMember` / `lineItems`(第二段)/ `channelProps` / `handoff`(交接模式)/ `select`(点中的节点顺手选中,走 `onSelect` 那一套) | `this`(只负责那条示例假通道,真正新增走 `addChannel`) |
|
|
189
|
+
| `beginAddChannel(options = {})` | `options?: GisViewChannelDraftOptions` 草稿配置:`kind` / `circuits` / `autoCommit` / `continuous` / `chain` / `name` / `lineId` / `lineProps` / `linePropsByMember` / `lineItems`(第二段)/ `routing` / `path`(中间拐点)/ `channelProps` / `channelDraftStyle`(本次草稿的预览样式)/ `handoff`(交接模式)/ `select`(点中的节点顺手选中,走 `onSelect` 那一套) | `this`(只负责那条示例假通道,真正新增走 `addChannel`) |
|
|
190
190
|
| `getAddChannelDraft()` | 无 | `GisViewChannelDraftPayload \| null` |
|
|
191
|
+
| `updateAddChannelStyle(patch = {})` | `patch?: GisViewChannelDraftStyle \| null` 字段级合并的预览样式(箭头位置 / 多回线间距 / 自绘等);传 `null` 回到全局 `channelDraftStyle` | `this` |
|
|
191
192
|
| `continueAddChannel(options = {})` | `options?: GisViewChannelDraftOptions` 开下一段草稿(写法与 `beginAddChannel` 一致,不传就沿用这一段原来的) | `this` |
|
|
192
193
|
| `cancelAddChannel()` | 无 | `this`(收掉草稿并补一条 `phase: 'cancel'`) |
|
|
193
194
|
| `endAddChannel()` | 无 | `this`(静默收掉视图上的示例假通道 / 线路,数据不动、不补事件) |
|
|
194
|
-
| `commitAddChannel(resolution?, options?)` | `resolution?: GisViewChannelAddResolution` 落地方式(`'channel'` / `'line'`,缺省看草稿);`options?: GisViewChannelAddInput` 要覆盖的字段(`name` / `circuits` / `colors` / `lineWidth` / `path`…) | `GisViewChannelAddResult` |
|
|
195
|
+
| `commitAddChannel(resolution?, options?)` | `resolution?: GisViewChannelAddResolution` 落地方式(`'channel'` / `'line'`,缺省看草稿);`options?: GisViewChannelAddInput` 要覆盖的字段(`name` / `circuits` / `colors` / `lineWidth` / `routing` / `path`…) | `GisViewChannelAddResult` |
|
|
195
196
|
| `getChannelAddOptions(from, to, count?, kind?)` | `from` / `to` 两端节点 id;`count?: number` 回数(缺省 1);`kind?: 'channel' \| 'line'`(缺省 `'channel'`) | `GisViewChannelAddPlan \| null` |
|
|
196
197
|
| `getChannelBetween(from, to)` | `from` / `to` 两端节点 id | `GisViewChannelBetween \| null` |
|
|
197
|
-
| `addChannel(channel, lineData?, group?)` | `channel: GisViewChannelAddSpec` 通道信息 `{ from, to, name?, id?, lineData?, group? }`(后两个是第二 / 第三段写在对象上的别名);`lineData?: GisViewChannelLineData` 线路数组(`Partial<GisViewLine>` / `string` / `number` 的一条或一批,按每项 id 建 `lineIds`);`group?: GisViewChannelAddGroup \| GisViewChannelAddGroup[]` 可选分组信息 `{ id?, lineIds?, path? }`。旧写法 `addChannel(input, lineItems?)`(`GisViewChannelAddInput`:`circuits` / `resolution` / `channelId` / `groupId` / `groupIndex` / `kind`
|
|
198
|
+
| `addChannel(channel, lineData?, group?)` | `channel: GisViewChannelAddSpec` 通道信息 `{ from, to, name?, id?, lineData?, group? }`(后两个是第二 / 第三段写在对象上的别名);`lineData?: GisViewChannelLineData` 线路数组(`Partial<GisViewLine>` / `string` / `number` 的一条或一批,按每项 id 建 `lineIds`);`group?: GisViewChannelAddGroup \| GisViewChannelAddGroup[]` 可选分组信息 `{ id?, lineIds?, path? }`。旧写法 `addChannel(input, lineItems?)`(`GisViewChannelAddInput`:`circuits` / `resolution` / `channelId` / `groupId` / `groupIndex` / `kind` / `routing` / `path` 那套)照样认;`path` 是中间拐点,独立线路落地成完整折线、通道只写骨架拐点 | `GisViewChannelAddResult`(`channelLineIds` 是落地后通道的完整成员表,独立线路为 `null`) |
|
|
198
199
|
| `addChannelGroupLines(channelId, lineData?, group?)` | `channelId` 目标通道 id;`lineData?: GisViewChannelLineData` 这次新建的线路数组(按每项 id 建回线);`group?: GisViewChannelAddGroup` 新分组信息 `{ id?, path? }`(缺省 `${通道 id}::N`、不带拐点) | `GisViewChannelAddResult` |
|
|
199
200
|
| `addChannelGroups(channelId, groups, options = {})` | `channelId` 目标通道 id;`groups: GisViewChannelAddGroupInput \| GisViewChannelAddGroupInput[]` 每项 `{ id?, path?, lineData? \| lines? \| lineItems? }`(线路数据与 `addChannel` 第二段同一份写法);`options?: { emit?: boolean; label?: string }` `emit: false` 只落地不通知 | `GisViewAddChannelGroupsResult` |
|
|
200
201
|
| `joinChannelGroupLines(channelId, groupId, lineData?)` | `channelId` 目标通道 id;`groupId?: string \| number` 并进哪一组(认分组 id 也认序号,从 0 起;不传挑第一个还有余量的分组);`lineData?: GisViewChannelLineData` 这次新建的线路数组 | `GisViewChannelAddResult` |
|
|
201
|
-
| `addChannels(input, options?)` | `input: GisViewChannelAddInput \| GisViewChannelAddInput[]` 一条或一批声明(每条与 `addChannel`
|
|
202
|
-
| `addLine(input, lineData?)` | `input: GisViewChannelAddInput` 同上(等价 `addChannel({ ...input, kind: 'line' })
|
|
202
|
+
| `addChannels(input, options?)` | `input: GisViewChannelAddInput \| GisViewChannelAddInput[]` 一条或一批声明(每条与 `addChannel` 同一套写法;`routing: 'orthogonal'` 自动正交折线,`path` 是中间拐点,独立线路落地成完整 `path`、通道只写骨架);`options?: { emit?: boolean }` `emit: false` 只改数据不发 `dataChange` | `GisViewAddChannelsResult` |
|
|
203
|
+
| `addLine(input, lineData?)` | `input: GisViewChannelAddInput` 同上(等价 `addChannel({ ...input, kind: 'line' })`;`routing: 'orthogonal'` 自动正交折线,`path` 是中间拐点,落地成含两端的完整折线);第二段 `GisViewChannelLineData` 与 `addChannel` 的线路数组同一份 —— 每项可以只写一个 id(裸字符串 / 数字按 `{ id }` 收)、写对象给逐条字段,不写就按 `from-to-序号` 自动编号 | `GisViewChannelAddResult` |
|
|
203
204
|
| `removeLine(lineId)` | `lineId: string \| number` 要删的线路 id | `GisViewRemoveLineResult` |
|
|
204
205
|
| `removeLines(lineIds)` | `lineIds: string \| number \| 数组` 一次删多条 | `GisViewRemoveLinesResult` |
|
|
205
206
|
| `removeChannel(channelId)` | `channelId` 通道 id | `GisViewRemoveChannelResult` |
|
|
@@ -208,25 +209,25 @@
|
|
|
208
209
|
|
|
209
210
|
| 方法 | 参数(名字: 类型 = 默认值) | 返回 |
|
|
210
211
|
| --- | --- | --- |
|
|
211
|
-
| `setPointSize(id, size)` | `id` 节点 id / 下标;`size: number` 新的节点宽度(CSS 像素,圆的直径按 `size × 2 / √π` 算) | `this` |
|
|
212
|
-
| `setPointSymbol(id, symbol)` | `id` 节点定位;`symbol: GisViewSymbolInput \| null` 新符号(`'circle'` / `'square'` / `{ type: 'svg'… }` / 图片地址);传 `null` 回到内置圆 | `this` |
|
|
213
|
-
| `setPointColor(id, color)` | `id` 节点定位;`color: string` 新的填充色(`#rgb` / `rgba()` / `hsl()` / 颜色名都认) | `this` |
|
|
214
212
|
| `movePoint(id, coordinate)` 或 `movePoint(id, x, y)` | `id` 节点定位;`coordinate: GisViewCoordinate` 新坐标 `[x, y]` / `{ x, y }`,或分开写 `x: number` / `y: number` | `this` |
|
|
215
|
-
| `setLineWidth(id, width)` | `id` 线路定位;`width: number` 新的线宽(CSS 像素) | `this` |
|
|
216
|
-
| `setLineColor(id, color)` | `id` 线路定位;`color: string` 新的颜色 | `this` |
|
|
217
213
|
| `setLineWaypoints(id, coordinates)` | `id` 线路定位;`coordinates: GisViewCoordinate \| GisViewCoordinate[]` 新的**中间拐点**(不含首尾端点;传空数组 = 拉直;传单个坐标 = 只留一个拐点) | `this` |
|
|
218
214
|
| `getLineDecorations(id)` | `id` 线路定位 | `GisViewLineDecoration[]` |
|
|
219
215
|
| `setLineDecorations(id, decorations)` | `id` 线路定位;`decorations: GisViewLineDecoration[]` 整份替换(空数组 = 全摘掉) | `this` |
|
|
220
216
|
| `addLineDecoration(id, decoration)` | `id` 线路定位;`decoration: GisViewLineDecoration` 要追加的标记(`symbol` 必填,`position` / `anchor` / `parallel` / `size`…) | `GisViewLineDecoration \| null` |
|
|
221
217
|
| `updateLineDecoration(id, decorationIndex, patch)` | `id` 线路定位;`decorationIndex: number` 第几个标记(按 `decorations` 顺序,从 0 数);`patch: Partial<GisViewLineDecoration>` 要合并的字段 | `GisViewLineDecoration \| null` |
|
|
222
218
|
| `removeLineDecoration(id, decorationIndex)` | `id` 线路定位;`decorationIndex` 要摘掉的下标 | `GisViewLineDecoration \| null` |
|
|
223
|
-
| `
|
|
224
|
-
| `
|
|
225
|
-
| `
|
|
226
|
-
| `
|
|
227
|
-
| `
|
|
219
|
+
| `getPointDecorations(id)` | `id` 节点定位 | `GisViewPointDecoration[]`:节点没找到时给空数组,返回的是副本 |
|
|
220
|
+
| `setPointDecorations(id, decorations)` | `id` 节点定位;`decorations: GisViewPointDecoration[]` 整份替换(空数组 = 全摘掉) | `this` |
|
|
221
|
+
| `addPointDecoration(id, decoration)` | `id` 节点定位;`decoration: GisViewPointDecoration` 要追加的标记(`symbol` 必填,`offset` / `distance` / `direction` / `at` / `connector` / `size`…) | `GisViewPointDecoration \| null` |
|
|
222
|
+
| `updatePointDecoration(id, decorationIndex, patch)` | `id` 节点定位;`decorationIndex: number` 第几个标记(按 `points[].decorations` 顺序,从 0 数);`patch: Partial<GisViewPointDecoration>` 要合并的字段 | `GisViewPointDecoration \| null` |
|
|
223
|
+
| `removePointDecoration(id, decorationIndex)` | `id` 节点定位;`decorationIndex` 要摘掉的下标 | `GisViewPointDecoration \| null` |
|
|
224
|
+
| `beginDecorationDraft(options?)` | `options?: GisViewDecorationDraftOptions`:`target`(`'line'` 缺省 / `'point'` / `'both'`)、`symbol`(缺省 `'circle'`)、`size`(缺省 18)、`color` / `strokeColor` / `strokeWidth` / `opacity` / `shadow`、`parallel`(缺省 `false`)、`scope`(`'line'` 缺省 / `'group'` / `'channel'`)、`maxDistance`(屏幕像素,缺省 14)、`maxPerLine` / `maxPerPoint`(0 / 缺省 = 不限)、`allowedLines` / `allowedChannels` / `allowedGroups` / `allowedPoints`、节点侧 `placement`(位置来源:`'offset'` 缺省 / `'fixed'` / `'pointer'`)、`anchor`(落地关系:`'follow'` 保存相对节点的屏幕偏移 / `'fixed'` 保存世界坐标;缺省 `offset → follow`、`fixed / pointer → fixed`)、`offset` / `distance`(缺省 28)/ `direction`(0 度向上、顺时针)/ `at`(仅 `placement: 'fixed'` 时作为世界坐标来源)/ `angle` / `connector`、`allowDuplicate`(缺省 `true`)/ `duplicateStrategy`(`'offset'` 缺省 / `'reject'`)/ `duplicateDistance`(缺省 8)、`originalEvent` | `GisViewDecorationDraftPayload \| null`:`start` 载荷(字段与 `onDecorationDraft` 同一份) |
|
|
225
|
+
| `getDecorationDraft()` | 无 | `GisViewDecorationDraftPayload \| null`:当前草稿读数,没有草稿时 `null` |
|
|
226
|
+
| `updateDecorationDraft(patch?)` | `patch?: Partial<GisViewDecorationDraftOptions>` 只合并给出的图标 / 大小 / 方向 / 范围 / 命中距离 / 命中类型 / 节点位置来源与落地关系 / 白名单 / 重复策略 | `GisViewDecorationDraftPayload \| null`:`update` 载荷;没有草稿时 `null` |
|
|
227
|
+
| `commitDecorationDraft(overrides?)` | `overrides?: Partial<GisViewDecorationDraftOptions> & { position?: number }` 提交前临时覆盖(`position` 是沿线比例 0~1) | `GisViewDecorationCommitResult`:`{ ok, reason?, count, targets, decorations, pointTargets, pointDecorations, draft? }`;没有目标 / 超限 / 不在白名单 / 重复时 `ok: false`,数据不动 |
|
|
228
|
+
| `cancelDecorationDraft(options?)` | `options?: { originalEvent?: Event \| null }` 取消原因 / 原始事件 | `GisViewDecorationDraftPayload \| null`:`cancel` 载荷;没有草稿时 `null`,数据与历史不动 |
|
|
228
229
|
| `setChannelLineWidth(id, lineWidth)` | `id` 通道 id;`lineWidth: number` 新的回线线宽(**成员回线 + 通道声明一起改**,一次 `batch`、只发一条数据变更) | `this` |
|
|
229
|
-
| `setChannelColors(id, colors)` | `id` 通道 id;`colors: string \| string[]` 逐回线颜色(不够时按顺序循环取;只给一个就整条通道一个色;改单条回线颜色用 `
|
|
230
|
+
| `setChannelColors(id, colors)` | `id` 通道 id;`colors: string \| string[]` 逐回线颜色(不够时按顺序循环取;只给一个就整条通道一个色;改单条回线颜色用 `updateLine(id, { color })`) | `this` |
|
|
230
231
|
| `setChannelPath(id, coordinates)` | `id` 通道 id;`coordinates: GisViewCoordinate \| GisViewCoordinate[]` 新的**骨架中间拐点**(不含首尾两端;传空数组 = 拉直、传单个坐标 = 只留一个拐点;两端由节点坐标补齐,与通道数据里的 `path` 同义);分过组的通道写第一组的声明(`groups[].path` 优先于顶层 `path`;「第一组」跳过 `lineIds` 空的分组声明),要改别的组用 `updateChannel(id, { groups })` | `this` |
|
|
231
232
|
|
|
232
233
|
#### 增删数据
|
|
@@ -255,27 +256,42 @@
|
|
|
255
256
|
| `resetLabel(kind, ref, labelId?)` | `kind` / `ref`;`labelId?` 复位哪一条(缺省 `'default'`) | `boolean` |
|
|
256
257
|
| `resetLabels(kind?)` | `kind?: 'point' \| 'line'`(缺省两类都复位) | `number` |
|
|
257
258
|
|
|
259
|
+
#### 扩展图形
|
|
260
|
+
|
|
261
|
+
| 方法 | 参数(名字: 类型 = 默认值) | 返回 |
|
|
262
|
+
| --- | --- | --- |
|
|
263
|
+
| `addGraphic(graphic)` | `graphic: GisViewGraphic` 一个扩展图形(`type` / `x` / `y` / `width` / `height` 与对应的 `d` / `src` / `canvas`;`id` 已存在时按更新覆盖) | `GisViewGraphic \| null`:归一化后的读数;参数无效时为 `null` 并走 `onWarning` |
|
|
264
|
+
| `addGraphics(list)` | `list: GisViewGraphic \| GisViewGraphic[]` 一条或一批(无效条目单独跳过) | `GisViewGraphic[]`:实际加进去的读数 |
|
|
265
|
+
| `updateGraphic(id, patch)` | `id: string \| number` 图形 id;`patch: Partial<GisViewGraphic>` 要合并的字段(`style.width` / `style.height` / `style.fill` 等也认) | `GisViewGraphic \| null`:改后的读数;id 不存在或结果无效时为 `null` |
|
|
266
|
+
| `removeGraphic(id)` | `id: string \| number` 图形 id | `GisViewGraphic \| null`:删掉的那一条;id 不存在时为 `null` |
|
|
267
|
+
| `clearGraphics()` | 无 | `number`:清掉的条数(只清图形层,不碰要素数据) |
|
|
268
|
+
| `getGraphic(id)` | `id: string \| number` 图形 id | `GisViewGraphic \| null`:副本,没有时 `null` |
|
|
269
|
+
| `getGraphics()` | 无 | `GisViewGraphic[]`:按 `zIndex`、再按加入顺序排的副本数组 |
|
|
270
|
+
|
|
271
|
+
#### WebGL 自定义层
|
|
272
|
+
|
|
273
|
+
| 方法 | 参数(名字: 类型 = 默认值) | 返回 |
|
|
274
|
+
| --- | --- | --- |
|
|
275
|
+
| `requestRender()` | 无 | `this`:请求下一帧;层内部画动画时也可以在 `draw` 里调用 |
|
|
276
|
+
| `addWebGLLayer(layer)` | `layer: GisViewWebGLLayer`:`id`(同 id 覆盖)、`order`(小的先画,同 order 保持加入顺序)、`enabled`、`draw(context)`;`context` 给 `gl` / `canvas` / `viewport` / `camera` / `frame` / `project` / `unproject` / `requestRender` | `() => void`:卸载函数 |
|
|
277
|
+
| `updateWebGLLayer(id, patch)` | `id` 层 id;`patch: Partial<GisViewWebGLLayer>` 要改的 `order` / `enabled` / `draw` | `GisViewWebGLLayer \| null`:改后的读数;id 不存在时 `null` |
|
|
278
|
+
| `removeWebGLLayer(id)` | `id` 层 id | `GisViewWebGLLayer \| null`:删掉的读数;id 不存在时 `null` |
|
|
279
|
+
| `clearWebGLLayers()` | 无 | `number`:清掉的层数 |
|
|
280
|
+
| `getWebGLLayers()` | 无 | `GisViewWebGLLayer[]`:按 `order` 排好的副本 |
|
|
281
|
+
|
|
258
282
|
#### 导出
|
|
259
283
|
|
|
260
284
|
| 方法 | 参数(名字: 类型 = 默认值) | 返回 |
|
|
261
285
|
| --- | --- | --- |
|
|
262
|
-
| `exportData(options = {})` | `options: GisViewExportDataOptions`:`format`(`'view'` 缺省 / `'input'`
|
|
263
|
-
| `exportViewportData(options = {})` | 同 `exportData`(`format` / `parts` / `labels` / `box` / `extra`),另有 `margin: number`(视口外扩多少屏幕 CSS 像素,缺省 0)与 `rect: GisViewBounds`(直接给世界矩形替掉视口);`points` / `lines` / `channels` 不认 | `GisViewExportViewportResult`(`format: 'full'` 时是 `GisViewDocument` + `viewRect` / `margin`) |
|
|
264
|
-
| `exportStationData(options = {})` | `options: GisViewExportStationDataOptions` 节点记录口径的筛选(`points` 选哪些、`labels` 带不带标签、`extra`) | `GisViewExportStationDataResult` |
|
|
265
|
-
| `exportPointData(options = {})` | `options: GisViewExportFilterOptions`(`points` / `labels` / `extra`) | `GisViewExportPointDataResult` |
|
|
266
|
-
| `exportLineData(options = {})` | `options: GisViewExportFilterOptions`(`lines` / `labels` / `extra`) | `GisViewExportLineDataResult` |
|
|
267
|
-
| `exportChannelData(options = {})` | `options` 同上(`channels` / `labels`) | `GisViewExportChannelDataResult` |
|
|
268
|
-
| `exportParallelGroups(options = {})` | `options?: GisViewExportParallelGroupsOptions`(`all: true` 连没编辑过的也算、`extra`) | `GisViewExportParallelGroupsResult` |
|
|
286
|
+
| `exportData(options = {})` | `options: GisViewExportDataOptions`:`scope`(`'all'` 缺省 / `'viewport'` / `'selection'`,也认 `visible` / `view` / `selected`)、`format`(`'view'` 缺省 / `'input'` / `'new'` / `'test'` / `'full'`)、`parts`(只导 `points` / `lines` / `channels` / `parallelGroups` 里的哪几份)、`points` / `lines` / `channels`(只导指定要素)、`withLines: false`(selection 不要两端都在集合里的线路)、`labels`、`extra`。`format: 'full'` / `'input'` 返回可直接回灌的数据,不夹带 `scope` / `counts` 读数 | `GisViewExportDataResult \| GisViewDocument`(`format: 'full'`) |
|
|
269
287
|
| `exportImage(options = {})` | `options?: GisViewExportImageOptions`:`type`(`'image/png'` / `'image/jpeg'`)、`quality`(JPEG 0 ~ 1)、`scale`(导出倍数)、`background`(底色)、`transparent` | `Promise<string>` |
|
|
270
288
|
| `exportSelection(options = {})` | `options?: GisViewExportSelectionOptions`:`format` / `type` / `quality` / `scale` / `padding`(只导选中要素那一块) | `Promise<GisViewExportSelectionResult>` |
|
|
271
|
-
| `exportSelectionData(options = {})` | `options?: GisViewExportSelectionDataOptions`:`parts`(`points` / `lines` / `channels` / `parallelGroups` 要哪几份,缺省四份都出)、`labels` | `GisViewExportSelectionDataResult` |
|
|
272
289
|
|
|
273
290
|
#### 筛选
|
|
274
291
|
|
|
275
292
|
| 方法 | 参数(名字: 类型 = 默认值) | 返回 |
|
|
276
293
|
| --- | --- | --- |
|
|
277
294
|
| `setFilter(filter)` | `filter: GisViewFilterInput \| null` 筛选条件:完整格式 `{ points, lines, cascade, worker }`;只筛节点时可以简写成节点条件本身;传 `null` 等于清空 | `this` |
|
|
278
|
-
| `clearFilter()` | 无 | `this` |
|
|
279
295
|
| `getFilter()` | 无 | `GisViewFilter \| null` |
|
|
280
296
|
| `getFilterResult()` | 无 | `GisViewFilterResult \| null` |
|
|
281
297
|
|
|
@@ -286,7 +302,7 @@
|
|
|
286
302
|
| `on(name, handler)` | `name: GisViewEventName \| '*'` 事件名(`'dataChange'` / `'labelClick'`… 或 `'*'` 订阅全部);`handler: (payload, name?) => void` 回调,载荷字段见「事件」一节的表 | `() => void` 取消订阅 |
|
|
287
303
|
| `once(name, handler)` | 同上,只触发一次(回调跑完自动摘掉) | `() => void` 取消订阅 |
|
|
288
304
|
| `off(name, handler?)` | `name` 事件名;`handler?` 只摘掉这一个回调(不传 = 摘掉这个事件的全部) | `number` 摘掉几条 |
|
|
289
|
-
| `use(plugin)` | `plugin: GisViewPlugin`(`view => hook`,与 `options.plugins` 的写法一致):立即执行一次,返回卸载函数 —— 调它跑插件自己的 `destroy`(重复调用只清一次,实例销毁之后也安全) | `() => void` 卸载 |
|
|
305
|
+
| `use(plugin)` | `plugin: GisViewPlugin`(`(view, context) => hook`,与 `options.plugins` 的写法一致):立即执行一次,返回卸载函数 —— 调它跑插件自己的 `destroy`(重复调用只清一次,实例销毁之后也安全) | `() => void` 卸载 |
|
|
290
306
|
| `getFeatures()` | 无 | `GisViewFeatureState` |
|
|
291
307
|
| `setFeatures(next)` | `next: GisViewFeaturesInput` 预设名(`'edit'` / `'view'` / `'static'`)、开关表或布尔值 | `this` |
|
|
292
308
|
| `undo()` / `redo()` | 无 | `GisViewHistoryStepResult \| null` |
|