gis-view-webgl2 0.1.6 → 0.1.8
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 +9 -8
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +316 -233
- package/dist/index.js +1 -1
- package/docs/AI/345/257/271/350/257/235/346/261/207/346/200/273.md +106 -0
- package/docs/GisView.md +1 -1
- 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 +110 -0
- package/docs/demos/BasicDemo.vue +2 -2
- package/docs/demos/BatchAddDemo.vue +6 -6
- package/docs/demos/ConnectDemo.vue +164 -33
- package/docs/demos/CopyMergeDemo.vue +27 -14
- package/docs/demos/EventDemo.vue +17 -20
- package/docs/demos/LabelDemo.vue +7 -7
- package/docs/demos/StyleDemo.vue +1 -1
- package/docs/demos/api-index.js +34 -31
- package/docs/demos/gis-view-demo/GisViewDemoCardHeader.vue +1 -1
- package/docs/demos/gis-view-demo/GisViewDemoStage.vue +1 -1
- package/docs/demos/gis-view-demo/panels/DataPanels.vue +1 -1
- package/docs/demos/gis-view-demo/useGisViewDemo.js +33 -35
- 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 +8 -7
- package/docs/from0/05-/347/233/270/346/234/272/344/270/216/344/272/244/344/272/222.md +1 -1
- package/docs/from0/07-/351/200/232/351/201/223/345/210/206/347/273/204/344/270/216/345/244/232/345/233/236/347/272/277.md +26 -10
- package/docs/manual/02-/345/235/220/346/240/207/344/270/216/346/225/260/346/215/256.md +1 -1
- package/docs/manual/04-/344/272/213/344/273/266/344/270/216/345/233/236/350/260/203.md +49 -16
- 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 +9 -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 +60 -36
- package/docs/manual/08-/351/200/211/344/270/255/344/270/216/346/213/220/347/202/271.md +60 -4
- package/docs/manual/09-/351/200/232/351/201/223/344/270/216/345/244/232/345/233/236/347/272/277.md +17 -1
- 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 +226 -493
- package/docs/manual/12-/346/240/207/347/255/276/344/270/216/350/243/205/351/245/260.md +2 -2
- package/docs/manual/14-/350/247/206/345/233/276/344/270/216/347/255/233/351/200/211.md +12 -13
- package/docs/manual/16-/345/256/236/344/276/213/346/226/271/346/263/225/346/200/273/350/241/250.md +26 -23
- package/docs/manual/17-/345/217/202/346/225/260/351/200/237/346/237/245.md +23 -20
- package/docs/manual/18-/351/200/220/346/226/271/346/263/225/347/244/272/344/276/213.md +132 -79
- 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 +1 -1
- package/docs/manual/20-/346/200/247/350/203/275/344/270/216/345/244/247/346/225/260/346/215/256.md +2 -1
- 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 +4 -4
- package/docs/steps/README.md +9 -7
- package/docs/steps/bench-scale.html +1 -1
- package/docs/steps/index.html +6 -6
- package/docs/steps/selftest-actions.html +26 -25
- package/docs/steps/selftest-data.html +1 -1
- package/docs/steps/selftest-demos.html +102 -6
- package/docs/steps/selftest-docs.html +3 -3
- package/docs/steps/selftest-features.html +284 -52
- package/docs/steps/selftest-full.html +3 -3
- package/docs/steps/selftest-labels.html +1 -1
- package/docs/steps/selftest-perf.html +31 -4
- package/docs/steps/selftest-select.html +183 -1
- package/docs/steps/step-05-pick.js +4 -8
- package/docs/steps/step-07-channels.js +3 -5
- package/docs/steps/step-08-labels.js +3 -3
- package/docs/steps/step-10-full.js +3 -3
- package/docs/steps/step-12-events.js +41 -24
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1690,6 +1690,12 @@ export interface GisViewChannelLinesResult {
|
|
|
1690
1690
|
groups?: GisViewChannelGroupInfo[]
|
|
1691
1691
|
}
|
|
1692
1692
|
|
|
1693
|
+
/**
|
|
1694
|
+
* 草稿遇到「两端已有通道」时的处理:block 不发新通道、按失败返回;newGroup 把这次新增的回线放进新分组;
|
|
1695
|
+
* joinGroup 并进 groupId / groupIndex 指定的分组;auto 有新分组余量时优先新分组,否则并进可用分组
|
|
1696
|
+
*/
|
|
1697
|
+
export type GisViewChannelExistingMode = 'block' | 'newGroup' | 'joinGroup' | 'auto'
|
|
1698
|
+
|
|
1693
1699
|
/**
|
|
1694
1700
|
* 新增方案:newChannel 新建一条通道,newGroup 在原通道里加一组(不带拐点),
|
|
1695
1701
|
* joinGroup 把新回线并进原通道的某一组;上限(channelMaxGroups / channelGroupMaxLines)到了就不 enabled;
|
|
@@ -1740,6 +1746,14 @@ export interface GisViewChannelAddPlan {
|
|
|
1740
1746
|
to: GisViewChannelNodeDraft
|
|
1741
1747
|
/** 这一段加什么:'channel' 新建通道 / 回线(缺省),'line' 新建不挂通道的独立线路 */
|
|
1742
1748
|
kind: 'channel' | 'line'
|
|
1749
|
+
/** 这一次草稿是否处在单一通道模式(已有通道时按 existingChannel 处理) */
|
|
1750
|
+
singleChannel: boolean
|
|
1751
|
+
/** 草稿对已有通道的处理策略;没有配置时为 null(沿用旧的分组方案表) */
|
|
1752
|
+
existingChannel: GisViewChannelExistingMode | null
|
|
1753
|
+
/** 最终推荐的分组(preferred 为 joinGroup 时):group 读数已切到这一组 */
|
|
1754
|
+
targetGroupId: string | number | null
|
|
1755
|
+
/** 最终推荐分组的序号(从 0 起);不落到分组时为 -1 */
|
|
1756
|
+
targetGroupIndex: number
|
|
1743
1757
|
/** 这一次要加的回线数(余量按它算) */
|
|
1744
1758
|
count: number
|
|
1745
1759
|
/** 两个节点之间已有的通道 id(没有就是新建通道) */
|
|
@@ -1799,8 +1813,21 @@ export interface GisViewChannelDraftOptions {
|
|
|
1799
1813
|
continuous?: boolean | 'chain'
|
|
1800
1814
|
/** 连续新增时是否接着上一段的终点画(等价于 continuous: 'chain') */
|
|
1801
1815
|
chain?: boolean
|
|
1802
|
-
/**
|
|
1803
|
-
|
|
1816
|
+
/**
|
|
1817
|
+
* 单一通道模式:true 时 beginAddChannel 默认在已有通道上 fail(等价于 existingChannel: 'block');
|
|
1818
|
+
* 没有已有通道时仍正常新建。beginAddLine 不把 singleChannel 当作挂通道开关,挂已有通道请写 existingChannel
|
|
1819
|
+
*/
|
|
1820
|
+
singleChannel?: boolean
|
|
1821
|
+
/**
|
|
1822
|
+
* 两端已有通道时怎么办:block 失败、newGroup 新加一组、joinGroup 并进指定组、auto 新分组优先。
|
|
1823
|
+
* beginAddChannel 不写且 singleChannel 为 true 时按 block;beginAddLine 显式写 newGroup / joinGroup
|
|
1824
|
+
* 时可给已有通道加回线,不写则始终新建独立线路
|
|
1825
|
+
*/
|
|
1826
|
+
existingChannel?: GisViewChannelExistingMode
|
|
1827
|
+
/** joinGroup 的目标分组 id;也认 groupIndex(从 0 起,二者都写按 groupId) */
|
|
1828
|
+
groupId?: string | number
|
|
1829
|
+
/** joinGroup 的目标分组序号(从 0 起) */
|
|
1830
|
+
groupIndex?: number
|
|
1804
1831
|
/** 新建通道时一次加几回(缺省 1):新通道 / 新分组 / 并入分组的余量都按它算 */
|
|
1805
1832
|
circuits?: number
|
|
1806
1833
|
/** 新线路名,缺省按两端节点生成 */
|
|
@@ -1812,8 +1839,8 @@ export interface GisViewChannelDraftOptions {
|
|
|
1812
1839
|
lineProps?: Partial<GisViewLine>
|
|
1813
1840
|
/** 逐条回线的属性:按下标一一对应(第几项就只管第几回),盖在同一条 lineProps 之上;与 createChannels 的 linePropsByMember 同名同义 */
|
|
1814
1841
|
linePropsByMember?: Array<Partial<GisViewLine> | undefined>
|
|
1815
|
-
/** 第二段
|
|
1816
|
-
|
|
1842
|
+
/** 第二段 lineData(一条或一批):与 linePropsByMember 同义,给了几条这一段就加几条(circuits 按它对齐);每项也可以只写一个 id */
|
|
1843
|
+
lineData?: GisViewChannelLineData
|
|
1817
1844
|
/** 走线方式:'straight'(缺省,两端直连)/ 'orthogonal'(自动补一个先横后纵的 90° 拐点) */
|
|
1818
1845
|
routing?: 'straight' | 'orthogonal'
|
|
1819
1846
|
/** 中间拐点(不含两端):给了就按它折线;routing 的自动拐点只在没给有效拐点时补 */
|
|
@@ -1856,6 +1883,13 @@ export interface GisViewChannelDraftPayload {
|
|
|
1856
1883
|
chain: boolean
|
|
1857
1884
|
/** 这一段加什么:'channel' 新建通道 / 回线,'line' 新建不挂通道的独立线路 */
|
|
1858
1885
|
kind: 'channel' | 'line'
|
|
1886
|
+
/** 这一段是否开了单一通道模式 */
|
|
1887
|
+
singleChannel: boolean
|
|
1888
|
+
/** 这一段对已有通道的策略(没有配置时为 null) */
|
|
1889
|
+
existingChannel: GisViewChannelExistingMode | null
|
|
1890
|
+
/** 推荐落点的目标分组:preferred 为 joinGroup 时有值,否则为 null / -1 */
|
|
1891
|
+
targetGroupId: string | number | null
|
|
1892
|
+
targetGroupIndex: number
|
|
1859
1893
|
/** 这一次要加的回线数(kind 为 'channel' 时才有意义) */
|
|
1860
1894
|
circuits: number
|
|
1861
1895
|
/** 这是草稿里的第几次点击:1 拿到起点、2 拿到终点(线路结束)、0 表示不是点击 */
|
|
@@ -1876,8 +1910,8 @@ export interface GisViewChannelDraftPayload {
|
|
|
1876
1910
|
lineProps?: Partial<GisViewLine>
|
|
1877
1911
|
/** 逐条回线的属性(与 createChannels 同名同义):按下标一一对应,没配为 null */
|
|
1878
1912
|
linePropsByMember?: Array<Partial<GisViewLine> | undefined> | null
|
|
1879
|
-
/** 第二段
|
|
1880
|
-
|
|
1913
|
+
/** 第二段 lineData(一条或一批):与 linePropsByMember 同一份写法,提交时一起交给 addChannel */
|
|
1914
|
+
lineData?: Array<Partial<GisViewLine> | undefined> | null
|
|
1881
1915
|
channelProps?: Partial<GisViewChannel>
|
|
1882
1916
|
/** 这一次草稿实际生效的预览样式(全局配置 + 本次覆盖) */
|
|
1883
1917
|
style: GisViewChannelDraftStyle
|
|
@@ -2084,10 +2118,9 @@ export interface GisViewAddWaypointsResult {
|
|
|
2084
2118
|
|
|
2085
2119
|
/** addChannelGroups 的一项:分组信息(id / path)外加这一组新建的线路数据 */
|
|
2086
2120
|
export interface GisViewChannelAddGroupInput extends GisViewChannelAddGroup {
|
|
2087
|
-
/**
|
|
2121
|
+
/** 这一组新建的线路数据(两个名字等价,写法同 addChannel 第二段) */
|
|
2088
2122
|
lineData?: GisViewChannelLineData
|
|
2089
2123
|
lines?: GisViewChannelLineData
|
|
2090
|
-
lineItems?: GisViewChannelLineData
|
|
2091
2124
|
}
|
|
2092
2125
|
|
|
2093
2126
|
/** addChannelGroups 的返回:逐组结果、成功落地的回线 id 与新分组 id */
|
|
@@ -2188,63 +2221,33 @@ export interface GisViewChannelInView {
|
|
|
2188
2221
|
groupIds: Array<string | number>
|
|
2189
2222
|
}
|
|
2190
2223
|
|
|
2191
|
-
/**
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2224
|
+
/** 新增草稿提交时选择落点:显式方案,或 'auto' 使用草稿的推荐方案 */
|
|
2225
|
+
export type GisViewChannelAddResolution = 'auto' | 'newChannel' | 'newGroup' | 'joinGroup' | 'newLine' | {
|
|
2226
|
+
type?: 'newChannel' | 'newGroup' | 'joinGroup' | 'newLine'
|
|
2227
|
+
groupId?: string | number
|
|
2228
|
+
groupIndex?: number
|
|
2229
|
+
channelId?: string | number
|
|
2230
|
+
}
|
|
2197
2231
|
|
|
2198
|
-
/**
|
|
2199
|
-
export interface
|
|
2232
|
+
/** 程序化新增独立线路的入参:按两个节点生成线路,不挂通道 */
|
|
2233
|
+
export interface GisViewLineAddSpec {
|
|
2200
2234
|
from: string | number
|
|
2201
2235
|
to: string | number
|
|
2202
|
-
/**
|
|
2203
|
-
* 缺省 / 'auto' 先新建通道、再加新分组、最后并入现有分组;也可以直接给 type 或 { groupId } / { groupIndex } 指定。
|
|
2204
|
-
* 只写 channelId 时按这条通道自己的推荐顺序挑(新分组 → 第一个能并的分组)。
|
|
2205
|
-
* kind 为 'line'(新增独立线路)时不走方案表,这一步忽略
|
|
2206
|
-
*/
|
|
2207
|
-
resolution?: 'auto' | 'newChannel' | 'newGroup' | 'joinGroup' | 'newLine' | { type?: 'newChannel' | 'newGroup' | 'joinGroup' | 'newLine'; groupId?: string | number; groupIndex?: number; channelId?: string | number }
|
|
2208
|
-
/** 加通道还是加独立线路:'channel' 缺省,'line' 不挂通道(addLine 就是它的快捷写法) */
|
|
2209
|
-
kind?: 'channel' | 'line'
|
|
2210
|
-
/** 一次加几回(缺省 1):新建通道 / 新分组 / 并入分组的余量都按它算 */
|
|
2211
|
-
circuits?: number
|
|
2212
|
-
/** 线路名,缺省按两端节点生成 */
|
|
2236
|
+
/** 线路名,缺省按两端节点生成;一次多回时自动带序号 */
|
|
2213
2237
|
name?: string
|
|
2214
|
-
/**
|
|
2215
|
-
lineId?: string | number
|
|
2238
|
+
/** 第一条回线的 id 种子;一次多回时自动带序号,第二段每项也可以各写自己的 id */
|
|
2216
2239
|
id?: string | number
|
|
2217
|
-
|
|
2218
|
-
/**
|
|
2219
|
-
* 新建通道时的通道 id;两个节点之间已经有通道时,它是「并进哪条通道」的筛选条件
|
|
2220
|
-
* (等价于 resolution 里只写 channelId,按这条通道自己的推荐顺序挑:新分组 → 第一个能并的分组)
|
|
2221
|
-
*/
|
|
2222
|
-
channelId?: string | number
|
|
2223
|
-
channelName?: string
|
|
2224
|
-
/**
|
|
2225
|
-
* 并进已有通道的哪一组(等价于 resolution: { type: 'joinGroup', groupId }):
|
|
2226
|
-
* 与 groupIndex 二选一,都写按 groupId;两个节点之间还没有通道时忽略
|
|
2227
|
-
*/
|
|
2228
|
-
groupId?: string | number
|
|
2229
|
-
/** 并进已有通道的第几组(从 0 起,与 groupId 二选一):两个节点之间还没有通道时忽略 */
|
|
2230
|
-
groupIndex?: number
|
|
2240
|
+
/** 所有回线共用的业务字段(颜色 / 线宽 / 线型…) */
|
|
2231
2241
|
lineProps?: Partial<GisViewLine>
|
|
2232
|
-
/**
|
|
2233
|
-
linePropsByMember?: Array<Partial<GisViewLine> | undefined>
|
|
2234
|
-
/**
|
|
2235
|
-
* 与回线一一对应的逐条属性(addChannel / addLine 的第二段也行):一条或一批 —— 给了几条就建几条
|
|
2236
|
-
* (circuits 忽略),每一项盖在同一条 lineProps 与 linePropsByMember 对应项之上;
|
|
2237
|
-
* 每一项也可以只写一个 id(裸字符串 / 数字按 { id } 收)
|
|
2238
|
-
*/
|
|
2239
|
-
lineItems?: GisViewChannelLineItems
|
|
2240
|
-
channelProps?: Partial<GisViewChannel>
|
|
2241
|
-
/** 中间拐点(不含两端):新建通道写进骨架,新建独立线路展开成完整 path;routing 为 orthogonal 时自动补拐点 */
|
|
2242
|
+
/** 中间拐点;routing 为 orthogonal 时也可由它自动补拐点 */
|
|
2242
2243
|
path?: GisViewCoordinate[]
|
|
2243
|
-
/** 走线方式:'straight'(缺省)/ 'orthogonal'
|
|
2244
|
+
/** 走线方式:'straight'(缺省)/ 'orthogonal' */
|
|
2244
2245
|
routing?: 'straight' | 'orthogonal'
|
|
2246
|
+
/** 第二段的别名:线路数据,一条或一批 */
|
|
2247
|
+
lineData?: GisViewChannelLineData
|
|
2245
2248
|
}
|
|
2246
2249
|
|
|
2247
|
-
/**
|
|
2250
|
+
/** 第二段线路数据(lineData):对象里的 id 就是回线 id(没写的自动编号),裸字符串 / 数字等价于 { id } */
|
|
2248
2251
|
export type GisViewChannelLineData = Partial<GisViewLine> | string | number | Array<Partial<GisViewLine> | string | number | undefined>
|
|
2249
2252
|
|
|
2250
2253
|
/** 新签名 addChannel 第三段的一项:新通道的分组信息(id / 成员 / 中间拐点;缺省整条通道一组) */
|
|
@@ -2267,6 +2270,12 @@ export interface GisViewChannelAddSpec {
|
|
|
2267
2270
|
name?: string
|
|
2268
2271
|
/** 通道 id,缺省按两端节点拼 channel-<from>-<to> */
|
|
2269
2272
|
id?: string | number
|
|
2273
|
+
/** 其余通道字段(宽度 / 偏移方式…) */
|
|
2274
|
+
channelProps?: Partial<GisViewChannel>
|
|
2275
|
+
/** 中间拐点(不含两端):写进通道骨架;routing 为 orthogonal 时自动补拐点 */
|
|
2276
|
+
path?: GisViewCoordinate[]
|
|
2277
|
+
/** 走线方式:'straight'(缺省)/ 'orthogonal' */
|
|
2278
|
+
routing?: 'straight' | 'orthogonal'
|
|
2270
2279
|
/** 第二段的别名(写在对象上时用它):线路数组 line_data */
|
|
2271
2280
|
lineData?: GisViewChannelLineData
|
|
2272
2281
|
/** 第三段的别名(写在对象上时用它):分组信息 */
|
|
@@ -2274,20 +2283,27 @@ export interface GisViewChannelAddSpec {
|
|
|
2274
2283
|
}
|
|
2275
2284
|
|
|
2276
2285
|
/**
|
|
2277
|
-
* commitAddChannel
|
|
2278
|
-
* -
|
|
2279
|
-
* -
|
|
2280
|
-
* -
|
|
2286
|
+
* commitAddChannel 的对象入参:通道 / 线路对象放在 channel / line / lines / lineData 里逐段给。
|
|
2287
|
+
* - channel.lineIds 的每个 id 生成一条新回线,channel.groups 是分组声明;通道 id 不参与回线 id。
|
|
2288
|
+
* - line 的业务字段透传到 lineProps;path 是中间拐点,首尾仍取 from / to。
|
|
2289
|
+
* - line 缺省是独立线路,lines / lineData 才是成员回线表,且 lines 优先;
|
|
2281
2290
|
* 空数组不覆盖草稿。channel.lineIds 只在没有成员回线表时当 id 种子。
|
|
2282
2291
|
* - 对象里的端点、id、名称、路径、样式与分组优先于草稿;没写的字段仍沿用当前草稿。
|
|
2283
|
-
* -
|
|
2292
|
+
* - 公共字段写顶层 lineProps,单条写 lines[i]。
|
|
2284
2293
|
*/
|
|
2285
|
-
export interface GisViewChannelAddCommitInput
|
|
2294
|
+
export interface GisViewChannelAddCommitInput {
|
|
2295
|
+
from?: string | number
|
|
2296
|
+
to?: string | number
|
|
2297
|
+
name?: string
|
|
2298
|
+
/** 线路 id 种子(通道 id 写在 channel.id) */
|
|
2299
|
+
id?: string | number
|
|
2300
|
+
/** 这次提交选哪个落点;不写就用草稿的推荐方案 */
|
|
2301
|
+
resolution?: GisViewChannelAddResolution
|
|
2286
2302
|
/** 本次新增的通道对象(lineIds 会作为新回线 id 种子;groups 作为分组声明) */
|
|
2287
2303
|
channel?: GisViewChannel
|
|
2288
2304
|
/** 本次新增的一条线路对象(写了它就按独立线路提交) */
|
|
2289
2305
|
line?: GisViewLine
|
|
2290
|
-
/** 本次新增的回线对象 / 数据(一条或一批,与 lineData
|
|
2306
|
+
/** 本次新增的回线对象 / 数据(一条或一批,与 lineData 同义) */
|
|
2291
2307
|
lines?: GisViewChannelLineData
|
|
2292
2308
|
/** lines 的别名(与 addChannel 的第二段同一个写法) */
|
|
2293
2309
|
lineData?: GisViewChannelLineData
|
|
@@ -2295,6 +2311,16 @@ export interface GisViewChannelAddCommitInput extends Partial<GisViewChannelAddI
|
|
|
2295
2311
|
channelGroups?: GisViewChannelAddGroup | GisViewChannelAddGroup[]
|
|
2296
2312
|
/** channelGroups 的别名(与 addChannel 的第三段同一个写法) */
|
|
2297
2313
|
group?: GisViewChannelAddGroup | GisViewChannelAddGroup[]
|
|
2314
|
+
/** 所有新回线共用的业务字段 */
|
|
2315
|
+
lineProps?: Partial<GisViewLine>
|
|
2316
|
+
/** 逐条回线的业务字段:按下标覆盖 lineProps / lines[i] */
|
|
2317
|
+
linePropsByMember?: Array<Partial<GisViewLine> | undefined>
|
|
2318
|
+
/** 新通道的其余字段 */
|
|
2319
|
+
channelProps?: Partial<GisViewChannel>
|
|
2320
|
+
/** 中间拐点(不含两端) */
|
|
2321
|
+
path?: GisViewCoordinate[]
|
|
2322
|
+
/** 走线方式:'straight' / 'orthogonal' */
|
|
2323
|
+
routing?: 'straight' | 'orthogonal'
|
|
2298
2324
|
}
|
|
2299
2325
|
|
|
2300
2326
|
/** 新增通道草稿端点示例点单端的样式:只写哪几项就覆盖哪几项 */
|
|
@@ -2724,6 +2750,11 @@ export interface GisViewPickResult extends GisViewFeatureKey {
|
|
|
2724
2750
|
groupIndex?: number
|
|
2725
2751
|
/** 命中的是通道内的回线时,这一组的读数(成员、拐点数、骨架),结构与 getChannelGroups 的一项一致 */
|
|
2726
2752
|
group?: GisViewChannelGroupInfo & { groupIndex: number; lineCount: number; waypointCount: number }
|
|
2753
|
+
/**
|
|
2754
|
+
* 命中的是通道内的回线时,同一通道全部分组的读数(按声明顺序,每项 groupIndex 是组号)。
|
|
2755
|
+
* `group` 是当前命中的那一组,`groups` 是整条通道的分组表;通道外的线路没有这两个字段。
|
|
2756
|
+
*/
|
|
2757
|
+
groups?: Array<GisViewChannelGroupInfo & { groupIndex: number; lineCount: number; waypointCount: number }>
|
|
2727
2758
|
}
|
|
2728
2759
|
|
|
2729
2760
|
/** 点聚合配置:true 等价于开着一份缺省档;对象写法可逐项覆盖。 */
|
|
@@ -2770,11 +2801,6 @@ export interface GisViewClusterPickResult extends GisViewCluster {
|
|
|
2770
2801
|
/** pick / pickAt / hover 可能拿到普通要素或聚合圆。 */
|
|
2771
2802
|
export type GisViewHitResult = GisViewPickResult | GisViewClusterPickResult
|
|
2772
2803
|
|
|
2773
|
-
/** action.data 里的聚合读数:不带 action 自身,避免载荷循环引用。 */
|
|
2774
|
-
export interface GisViewClusterPointerData extends GisViewCluster {
|
|
2775
|
-
type: 'cluster'
|
|
2776
|
-
}
|
|
2777
|
-
|
|
2778
2804
|
/** 聚合数量文字:覆盖层每帧只需要位置、半径与数量。 */
|
|
2779
2805
|
export interface GisViewClusterLabel {
|
|
2780
2806
|
id: string
|
|
@@ -2783,17 +2809,59 @@ export interface GisViewClusterLabel {
|
|
|
2783
2809
|
radius: number
|
|
2784
2810
|
}
|
|
2785
2811
|
|
|
2786
|
-
/**
|
|
2812
|
+
/**
|
|
2813
|
+
* onClusterClick / clusterClick 的载荷:与点击载荷同一套指针字段,但不带普通要素的 item。
|
|
2814
|
+
* 鼠标键与修饰键读 `originalEvent`;选中集读数用 `getSelectionInfo()`。
|
|
2815
|
+
*/
|
|
2787
2816
|
export type GisViewClusterClickPayload = GisViewClusterPickResult & {
|
|
2788
|
-
button?: number
|
|
2789
|
-
buttons?: number
|
|
2790
2817
|
originalEvent: Event
|
|
2791
|
-
selection: GisViewSelectionInfo
|
|
2792
2818
|
action: GisViewPointerAction
|
|
2793
2819
|
}
|
|
2794
2820
|
|
|
2821
|
+
/**
|
|
2822
|
+
* 一条被选中的通道的上下文:通道本身、当前组与全部分组。
|
|
2823
|
+
* 单通道选中时这些字段直接摊平到选中载荷顶层;多通道时改为 channelContexts 里的一项,不会两处重复。
|
|
2824
|
+
*/
|
|
2825
|
+
export interface GisViewSelectionChannelContext {
|
|
2826
|
+
channelId: string | number
|
|
2827
|
+
channelIndex: number
|
|
2828
|
+
channel: GisViewChannel
|
|
2829
|
+
/** 当前组:真实点击 / selectAt 是命中的那一组;框选 / 按引用接口是选中集里第一条通道回线所在的组 */
|
|
2830
|
+
groupId: string | number
|
|
2831
|
+
groupIndex: number
|
|
2832
|
+
group: GisViewChannelGroupInfo & { groupIndex: number; lineCount: number; waypointCount: number }
|
|
2833
|
+
/** 同一通道的全部分组(按声明顺序;同一条通道内与其他载荷项共享这一份数组) */
|
|
2834
|
+
groups: Array<GisViewChannelGroupInfo & { groupIndex: number; lineCount: number; waypointCount: number }>
|
|
2835
|
+
/** 本次选中集里属于这条通道的回线下标 / id */
|
|
2836
|
+
lineIndexes: number[]
|
|
2837
|
+
lineIds: Array<string | number>
|
|
2838
|
+
}
|
|
2839
|
+
|
|
2840
|
+
/** 选中载荷里的通道上下文字段:只有一条通道时摊平,多通道时只保留 channelContexts */
|
|
2841
|
+
export interface GisViewSelectionChannelFields {
|
|
2842
|
+
channelId?: string | number
|
|
2843
|
+
channelIndex?: number
|
|
2844
|
+
channel?: GisViewChannel
|
|
2845
|
+
groupId?: string | number
|
|
2846
|
+
groupIndex?: number
|
|
2847
|
+
group?: GisViewChannelGroupInfo & { groupIndex: number; lineCount: number; waypointCount: number }
|
|
2848
|
+
groups?: Array<GisViewChannelGroupInfo & { groupIndex: number; lineCount: number; waypointCount: number }>
|
|
2849
|
+
/** 本次选中集里属于这条通道的回线下标 / id;单通道与 channelContexts 的每项都会给 */
|
|
2850
|
+
lineIndexes?: number[]
|
|
2851
|
+
lineIds?: Array<string | number>
|
|
2852
|
+
/** 选中集涉及多条通道时才有(按选中顺序);单通道不创建这一份,直接读顶层平铺字段 */
|
|
2853
|
+
channelContexts?: GisViewSelectionChannelContext[]
|
|
2854
|
+
}
|
|
2855
|
+
|
|
2856
|
+
/** describeSelection 的返回值:要素读数 + 与选中载荷同一套通道上下文字段 */
|
|
2857
|
+
export interface GisViewDescribedSelection extends GisViewSelectionChannelFields {
|
|
2858
|
+
/** 选中项;通道回线不重复挂通道字段,归属看外层的 lineIndexes / channelContexts */
|
|
2859
|
+
items: GisViewPickResult[]
|
|
2860
|
+
}
|
|
2861
|
+
|
|
2795
2862
|
/** 选中事件载荷:点击选中为 0 / 1 个要素,Shift 框选为框内全部节点(随 shortcuts.boxSelect 改变) */
|
|
2796
|
-
export interface GisViewSelectPayload {
|
|
2863
|
+
export interface GisViewSelectPayload extends GisViewSelectionChannelFields {
|
|
2864
|
+
/** 选中项;通道回线不重复挂 channelId / channelIndex / groupId / groups,归属看顶层 lineIndexes / channelContexts */
|
|
2797
2865
|
items: GisViewPickResult[]
|
|
2798
2866
|
/** 框选时的画布 CSS 像素矩形,点击选中为 null */
|
|
2799
2867
|
box: GisViewRect | null
|
|
@@ -2805,11 +2873,10 @@ export interface GisViewSelectPayload {
|
|
|
2805
2873
|
mode?: 'single' | 'multi' | 'box'
|
|
2806
2874
|
}
|
|
2807
2875
|
|
|
2808
|
-
/**
|
|
2809
2876
|
/**
|
|
2810
2877
|
* 选中集读数:ids(选中要素的 id,没有 id 的不进这里)/ count(要素条数)/
|
|
2811
|
-
*
|
|
2812
|
-
* onSelectChange
|
|
2878
|
+
* points / lines / channels(各类型几个,通道回线按通道算一个)的**计数**版本。
|
|
2879
|
+
* onSelectChange、getSelectionInfo() 与 getSelectionData() 的计数部分都是同一份口径。
|
|
2813
2880
|
*/
|
|
2814
2881
|
export interface GisViewSelectionInfo {
|
|
2815
2882
|
ids: Array<string | number>
|
|
@@ -2890,7 +2957,7 @@ export interface GisViewSelectionData {
|
|
|
2890
2957
|
lines: GisViewLine[]
|
|
2891
2958
|
/** 选中回线所属的通道(去重) */
|
|
2892
2959
|
channels: GisViewChannel[]
|
|
2893
|
-
/** 与 getSelections()
|
|
2960
|
+
/** 与 getSelections() 同一份:带下标与坐标,通道回线不重复挂通道字段 */
|
|
2894
2961
|
items: GisViewPickResult[]
|
|
2895
2962
|
pointIndexes: number[]
|
|
2896
2963
|
lineIndexes: number[]
|
|
@@ -2901,7 +2968,8 @@ export interface GisViewSelectionData {
|
|
|
2901
2968
|
* 选中集变更载荷:与 onSelect 的区别是这个只在「选中集真的变了」时发一条,
|
|
2902
2969
|
* 接口选中(select / clearSelection / selectInBox)也会发。
|
|
2903
2970
|
*/
|
|
2904
|
-
export interface GisViewSelectChangePayload extends GisViewSelectionInfo {
|
|
2971
|
+
export interface GisViewSelectChangePayload extends GisViewSelectionInfo, GisViewSelectionChannelFields {
|
|
2972
|
+
/** 与对应 onSelect 载荷共用同一批对象;通道回线不重复挂 channelId / channelIndex / groupId / groups */
|
|
2905
2973
|
items: GisViewPickResult[]
|
|
2906
2974
|
/** 框选时的矩形,其余为 null */
|
|
2907
2975
|
box: GisViewRect | null
|
|
@@ -2911,7 +2979,7 @@ export interface GisViewSelectChangePayload extends GisViewSelectionInfo {
|
|
|
2911
2979
|
/**
|
|
2912
2980
|
* 这一次操作的判读(与指针事件同一套写法):type 细到 'select'(点中一个或接口选中)/
|
|
2913
2981
|
* 'toggleSelect'(Ctrl 点击取反)/ 'boxSelect'(框选)/ 'clearSelection'(点空白、Esc 或接口清空);
|
|
2914
|
-
* target 是 'selection'(作用在一批要素上)或 'empty'
|
|
2982
|
+
* target 是 'selection'(作用在一批要素上)或 'empty'(清空成空集),这一批数据直接读载荷的 items。
|
|
2915
2983
|
* 取反与清空这两条路不经过 onClick,要按操作分支的界面认这一个字段。
|
|
2916
2984
|
*/
|
|
2917
2985
|
action: GisViewPointerAction
|
|
@@ -2931,8 +2999,8 @@ export interface GisViewWaypointPayload {
|
|
|
2931
2999
|
phase: 'add' | 'select' | 'remove' | 'start' | 'move' | 'end'
|
|
2932
3000
|
/**
|
|
2933
3001
|
* 这一次操作的判读:type 为 'addWaypoint' / 'removeWaypoint' / 'selectWaypoint' / 'dragWaypoint',
|
|
2934
|
-
* target 为 'waypoint'
|
|
2935
|
-
*
|
|
3002
|
+
* target 为 'waypoint'。哪条线、第几个顶点、坐标与改完的那条线直接读载荷顶层的
|
|
3003
|
+
* lineIndex / pathIndex / coordinate / line。
|
|
2936
3004
|
*/
|
|
2937
3005
|
action?: GisViewPointerAction
|
|
2938
3006
|
lineIndex: number
|
|
@@ -2986,15 +3054,11 @@ export interface GisViewChannelGroupChangePayload {
|
|
|
2986
3054
|
/**
|
|
2987
3055
|
* 点击与双击事件载荷,点击空白处时载荷为 null。
|
|
2988
3056
|
* selected 是点完之后的状态、wasSelected 是点之前的状态(Ctrl 点击是取反之前),
|
|
2989
|
-
*
|
|
3057
|
+
* 选中集读数用 getSelectionInfo(),鼠标键与修饰键读 originalEvent。
|
|
2990
3058
|
*/
|
|
2991
3059
|
export interface GisViewClickPayload extends GisViewPickResult {
|
|
2992
|
-
/**
|
|
2993
|
-
button?: number
|
|
2994
|
-
buttons?: number
|
|
3060
|
+
/** 原始点击事件:button / buttons / 修饰键与 clientX / clientY 都从这里读 */
|
|
2995
3061
|
originalEvent: Event
|
|
2996
|
-
/** 点完之后整个选中集的读数(ids / count / 各类型条数,通道回线按通道算一个) */
|
|
2997
|
-
selection: GisViewSelectionInfo
|
|
2998
3062
|
/**
|
|
2999
3063
|
* 这一次点击的判读:type 为 'select'(点中要素、选中已生效)或 'click'(没开选中时的普通点击),
|
|
3000
3064
|
* 多选取反生效时是 'toggleSelect';double 为 true 说明这一下是双击里的第二下。点空白处的载荷是 null,
|
|
@@ -3043,18 +3107,11 @@ export type GisViewPointerActionType =
|
|
|
3043
3107
|
| 'drag'
|
|
3044
3108
|
| 'pointer'
|
|
3045
3109
|
|
|
3046
|
-
/** 修饰键:与原生事件上的 ctrlKey / metaKey(⌘)/ shiftKey / altKey 一一对应 */
|
|
3047
|
-
export interface GisViewPointerModifiers {
|
|
3048
|
-
ctrl: boolean
|
|
3049
|
-
meta: boolean
|
|
3050
|
-
shift: boolean
|
|
3051
|
-
alt: boolean
|
|
3052
|
-
}
|
|
3053
|
-
|
|
3054
3110
|
/**
|
|
3055
|
-
* 一次指针操作的类型化判读:`action.type` 回答「这是什么操作」、`action.target`
|
|
3056
|
-
*
|
|
3057
|
-
*
|
|
3111
|
+
* 一次指针操作的类型化判读:`action.type` 回答「这是什么操作」、`action.target` 回答「点在什么上面」。
|
|
3112
|
+
* 原始输入不在这里重复:鼠标键 / 修饰键 / clientX / clientY 读载荷的 `originalEvent`,
|
|
3113
|
+
* 命中的数据读载荷自己的 `item`、`channelContext`、`items` 等字段。
|
|
3114
|
+
* 画布上的指针事件、拐点、标签、选中集共用这一套写法。
|
|
3058
3115
|
*/
|
|
3059
3116
|
export interface GisViewPointerAction {
|
|
3060
3117
|
type: GisViewPointerActionType
|
|
@@ -3064,18 +3121,6 @@ export interface GisViewPointerAction {
|
|
|
3064
3121
|
* 点击 / 右键 / 选中集事件恒为 false,拐点拖动事件里 start 为 false、move / end 为 true。
|
|
3065
3122
|
*/
|
|
3066
3123
|
moved: boolean
|
|
3067
|
-
/** 鼠标键名(left / middle / right),与载荷里的 button 数字一一对应;悬停没有按键,固定是 'none' */
|
|
3068
|
-
button?: 'left' | 'middle' | 'right' | 'none' | string
|
|
3069
|
-
/** 左键 / 右键两个布尔:判「是哪一只手」写 action.right 比比对字符串更直白(中键两个都是 false) */
|
|
3070
|
-
left?: boolean
|
|
3071
|
-
right?: boolean
|
|
3072
|
-
modifiers?: GisViewPointerModifiers
|
|
3073
|
-
/**
|
|
3074
|
-
* 按 target 直接取到的那一份数据:点 / 线是数据里那个对象(与 getData() 同一份引用)、
|
|
3075
|
-
* 通道回线是通道定义、选中集事件是这一批 items、拐点是「哪条线、第几个顶点、坐标、改完的线」,
|
|
3076
|
-
* 空白处是 null(拐点那一份见 GisViewWaypointPayload.action.data、标签那一份见 GisViewLabelActionData)。
|
|
3077
|
-
*/
|
|
3078
|
-
data?: GisViewPoint | GisViewLine | GisViewChannel | GisViewClusterPointerData | GisViewPickResult[] | GisViewWaypointActionData | GisViewLabelActionData | null
|
|
3079
3124
|
/** 只在 click 载荷里出现:true 说明这一下是双击里的第二下(单双击要分开做事的界面按它推迟一下) */
|
|
3080
3125
|
double?: boolean
|
|
3081
3126
|
/**
|
|
@@ -3089,20 +3134,6 @@ export interface GisViewPointerAction {
|
|
|
3089
3134
|
longPress?: boolean
|
|
3090
3135
|
}
|
|
3091
3136
|
|
|
3092
|
-
/** 拐点事件 action.data 的那一份读数:哪条线、第几个顶点、坐标与改完的那条线(与载荷里的同名字段同一份) */
|
|
3093
|
-
export interface GisViewWaypointActionData {
|
|
3094
|
-
lineIndex: number
|
|
3095
|
-
pathIndex: number
|
|
3096
|
-
coordinate: [number, number]
|
|
3097
|
-
line: GisViewLine
|
|
3098
|
-
}
|
|
3099
|
-
|
|
3100
|
-
/** 标签事件 action.data 的那一份读数:这一条标签的读数与它挂在哪条要素上(drag / click / 右键 / 双击都认) */
|
|
3101
|
-
export interface GisViewLabelActionData {
|
|
3102
|
-
label: GisViewLabelInfo | null
|
|
3103
|
-
parent: GisViewLabelParent | null
|
|
3104
|
-
}
|
|
3105
|
-
|
|
3106
3137
|
/**
|
|
3107
3138
|
* 通用指针载荷:左键按下 / 抬起、右键都会发一条。
|
|
3108
3139
|
* 命中的要素(点 / 线 / 通道回线)在 type / index / item 与通道字段里,没有命中时 type 为 null、hit 为 false;
|
|
@@ -3111,7 +3142,7 @@ export interface GisViewLabelActionData {
|
|
|
3111
3142
|
export interface GisViewPointerPayload {
|
|
3112
3143
|
/**
|
|
3113
3144
|
* 这一次操作的判读:按下时 type 是意图、松开时是刚做完的那件事、右键固定是 'contextMenu';
|
|
3114
|
-
* target 说明点的是点 / 线 / 通道 /
|
|
3145
|
+
* target 说明点的是点 / 线 / 通道 / 空白;命中的数据直接读载荷的 item / channel / channelContext 等字段。
|
|
3115
3146
|
*/
|
|
3116
3147
|
action: GisViewPointerAction
|
|
3117
3148
|
/** 命中的要素类型,空白处为 null;多成员聚合是 'cluster' */
|
|
@@ -3126,9 +3157,6 @@ export interface GisViewPointerPayload {
|
|
|
3126
3157
|
screen?: [number, number]
|
|
3127
3158
|
/** 命中的要素自身的世界坐标 */
|
|
3128
3159
|
coordinate?: [number, number]
|
|
3129
|
-
/** 命中的是线路(含通道回线)时,线路在 lines 数组里的下标与 id;右键菜单按它找线路 */
|
|
3130
|
-
lineIndex?: number
|
|
3131
|
-
lineId?: string | number
|
|
3132
3160
|
/** 命中的是通道内的回线时,回线所属通道与分组 */
|
|
3133
3161
|
channelIndex?: number
|
|
3134
3162
|
channel?: GisViewChannel
|
|
@@ -3136,6 +3164,8 @@ export interface GisViewPointerPayload {
|
|
|
3136
3164
|
groupIndex?: number
|
|
3137
3165
|
/** 命中的是通道内的回线时,这一组的读数 */
|
|
3138
3166
|
group?: GisViewChannelGroupInfo & { groupIndex: number; lineCount: number; waypointCount: number }
|
|
3167
|
+
/** 命中的是通道内的回线时,同一通道全部分组的读数;`group` 是当前这组,`groups` 是整条通道 */
|
|
3168
|
+
groups?: Array<GisViewChannelGroupInfo & { groupIndex: number; lineCount: number; waypointCount: number }>
|
|
3139
3169
|
/** 命中通道回线时的分组上下文:action.target 为 channel,按它直接渲染通道菜单 */
|
|
3140
3170
|
channelContext?: GisViewChannelContext
|
|
3141
3171
|
/** 命中多成员聚合时:聚合 id、成员数、成员下标 / id、包围盒与屏幕半径 */
|
|
@@ -3152,11 +3182,10 @@ export interface GisViewPointerPayload {
|
|
|
3152
3182
|
selected?: boolean
|
|
3153
3183
|
/** 见 selected:左键按下 / 右键这一路上两份是同一个值(点击载荷里才是「点之前 / 点之后」) */
|
|
3154
3184
|
wasSelected?: boolean
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
buttons: number
|
|
3185
|
+
/*
|
|
3186
|
+
* 选中集读数用 getSelectionInfo();鼠标键与修饰键用 originalEvent.button / buttons / ctrlKey /
|
|
3187
|
+
* metaKey / shiftKey / altKey。lineIndex 就是 index,线路 id 读 item.id 或 getLineChannel(index)。
|
|
3188
|
+
*/
|
|
3160
3189
|
/** 光标处的世界坐标 */
|
|
3161
3190
|
world: [number, number]
|
|
3162
3191
|
/** 配了 GeoJSON 底图时,光标位置对应的真实经纬度(含 aspectScale 反算) */
|
|
@@ -3164,16 +3193,15 @@ export interface GisViewPointerPayload {
|
|
|
3164
3193
|
/** 光标处的画布 CSS 像素 */
|
|
3165
3194
|
x: number
|
|
3166
3195
|
y: number
|
|
3167
|
-
clientX
|
|
3168
|
-
clientY: number
|
|
3196
|
+
/** 原始指针 / 鼠标事件:button / buttons / 修饰键 / clientX / clientY 都从这里读 */
|
|
3169
3197
|
originalEvent: PointerEvent | MouseEvent
|
|
3170
3198
|
}
|
|
3171
3199
|
|
|
3172
3200
|
/**
|
|
3173
3201
|
* 悬停载荷(onHover 与 hoverAt 的读数,没有悬停到东西时是 null):
|
|
3174
3202
|
* 与指针载荷同一层 —— 命中的要素在 type / index / item 与通道字段里,光标位置在 x / y / world 里,
|
|
3175
|
-
* 另外带一份 action(type 恒为 'hover'、target
|
|
3176
|
-
* 光标正好停在最近一次指针事件的位置上时,originalEvent /
|
|
3203
|
+
* 另外带一份 action(type 恒为 'hover'、target 说明停在什么上面)。
|
|
3204
|
+
* 光标正好停在最近一次指针事件的位置上时,originalEvent 就是那一次事件(按键 / 修饰键 / 指针位置都读得到)。
|
|
3177
3205
|
*/
|
|
3178
3206
|
export type GisViewHoverPayload = GisViewHitResult & {
|
|
3179
3207
|
/** 悬停读数一样有:有没有停在某个要素上(空白处是 null,不走这一份) */
|
|
@@ -3184,12 +3212,8 @@ export type GisViewHoverPayload = GisViewHitResult & {
|
|
|
3184
3212
|
y: number
|
|
3185
3213
|
/** 光标处的世界坐标 */
|
|
3186
3214
|
world: [number, number]
|
|
3187
|
-
clientX?: number
|
|
3188
|
-
clientY?: number
|
|
3189
3215
|
/** 光标就停在这一次指针事件的位置上时给出(程序化悬停 hoverAt 不带) */
|
|
3190
3216
|
originalEvent?: PointerEvent | MouseEvent | null
|
|
3191
|
-
/** 此刻整个选中集的读数(与指针载荷里的 selection 同一份) */
|
|
3192
|
-
selection?: GisViewSelectionInfo
|
|
3193
3217
|
}
|
|
3194
3218
|
export type GisViewCursorPayload = [number, number] | null
|
|
3195
3219
|
|
|
@@ -3240,8 +3264,6 @@ export interface GisViewPointCopyPayload {
|
|
|
3240
3264
|
index: number
|
|
3241
3265
|
/** 复制出来的节点:预览中就是含最新落点的那一份 */
|
|
3242
3266
|
item: GisViewPoint
|
|
3243
|
-
/** item 的别名,与其它载荷的写法对齐 */
|
|
3244
|
-
point: GisViewPoint
|
|
3245
3267
|
/** 来源节点;剪贴板这条的来源下标为 -1(快照还在) */
|
|
3246
3268
|
source: GisViewCopySource | null
|
|
3247
3269
|
/** 整组来源(clipboard 与多选复制时给全;普通 Alt 复制只有 source 一项) */
|
|
@@ -3262,8 +3284,6 @@ export interface GisViewPointCopyPayload {
|
|
|
3262
3284
|
/** 快照是否带上内部线路 / 通道 */
|
|
3263
3285
|
withLines?: boolean
|
|
3264
3286
|
withChannels?: boolean
|
|
3265
|
-
/** 复制出来的节点当前落在的世界坐标 */
|
|
3266
|
-
coordinate: [number, number] | null
|
|
3267
3287
|
/** 光标在画布内的 CSS 像素位置 */
|
|
3268
3288
|
screen: [number, number] | null
|
|
3269
3289
|
originalEvent: Event | null
|
|
@@ -3276,8 +3296,6 @@ export interface GisViewPointCopyPayload {
|
|
|
3276
3296
|
invalidated: boolean
|
|
3277
3297
|
/** 改复制节点的数据(字段级合并,坐标仍以预览落点为准),返回改完的节点 */
|
|
3278
3298
|
update(patch: Partial<GisViewPoint>): GisViewPoint | null
|
|
3279
|
-
/** 等价于 update */
|
|
3280
|
-
setItem(patch: Partial<GisViewPoint>): GisViewPoint | null
|
|
3281
3299
|
/** 取消这次复制:预览撤掉,数据不落地 */
|
|
3282
3300
|
cancel(): GisViewPointCopyPayload | null
|
|
3283
3301
|
/** 落地这次复制(interaction 结束后可以直接调) */
|
|
@@ -3365,13 +3383,11 @@ export interface GisViewBatchCopyPayload {
|
|
|
3365
3383
|
/** 屏幕像素偏移量 */
|
|
3366
3384
|
offsetScreen: [number, number]
|
|
3367
3385
|
anchor: [number, number]
|
|
3368
|
-
coordinate: [number, number] | null
|
|
3369
3386
|
screen: [number, number] | null
|
|
3370
3387
|
originalEvent: Event | null
|
|
3371
3388
|
cancelled: boolean
|
|
3372
3389
|
invalidated: boolean
|
|
3373
3390
|
update(patch?: Partial<GisViewPoint>): GisViewPoint | null
|
|
3374
|
-
setItem(patch?: Partial<GisViewPoint>): GisViewPoint | null
|
|
3375
3391
|
/** 撤销整批(等价于 revert) */
|
|
3376
3392
|
cancel(): GisViewBatchCopyPayload | null
|
|
3377
3393
|
/** 已经落地,原样返回这份载荷 */
|
|
@@ -3662,6 +3678,12 @@ export interface GisViewSplitPointOptions {
|
|
|
3662
3678
|
keepSourceId?: boolean
|
|
3663
3679
|
/** 这一步历史的标签,缺省「拆分节点」 */
|
|
3664
3680
|
label?: string
|
|
3681
|
+
/**
|
|
3682
|
+
* 没在 parts[].lines 里显式分配的线路怎么分:first 全跟第一份(缺省,兼容旧行为);
|
|
3683
|
+
* alternate 按「通道成组、独立线路单条」为单位轮流给负载最少的一份 —— 同一条通道的成员不会被拆散,
|
|
3684
|
+
* 解除合并时推荐用它
|
|
3685
|
+
*/
|
|
3686
|
+
autoLines?: 'first' | 'alternate'
|
|
3665
3687
|
}
|
|
3666
3688
|
|
|
3667
3689
|
/** 拆分时没认出来的线路 / 通道引用 */
|
|
@@ -3684,6 +3706,15 @@ export interface GisViewSplitPointChangeSet {
|
|
|
3684
3706
|
removedChannels: GisViewChannel[]
|
|
3685
3707
|
}
|
|
3686
3708
|
|
|
3709
|
+
/** splitPoint 自动 / 显式分配之后,每一份节点接到的线路读数 */
|
|
3710
|
+
export interface GisViewSplitPointLineAssignment {
|
|
3711
|
+
/** 第几份(与 items / pointIds 同序) */
|
|
3712
|
+
index: number
|
|
3713
|
+
pointId: string | number
|
|
3714
|
+
lineIds: Array<string | number>
|
|
3715
|
+
lineCount: number
|
|
3716
|
+
}
|
|
3717
|
+
|
|
3687
3718
|
/** splitPoint 的返回:ok 为 false 时 reason 说明原因,其余数组为空、changes 为 null */
|
|
3688
3719
|
export interface GisViewSplitPointOutcome {
|
|
3689
3720
|
ok: boolean
|
|
@@ -3701,6 +3732,12 @@ export interface GisViewSplitPointOutcome {
|
|
|
3701
3732
|
removedChannels: number
|
|
3702
3733
|
removedChannelIds: Array<string | number>
|
|
3703
3734
|
skipped: { lines: GisViewSplitPointSkip[]; channels: GisViewSplitPointSkip[] }
|
|
3735
|
+
/** 这一次采用的自动分线口径 */
|
|
3736
|
+
autoLines: 'first' | 'alternate'
|
|
3737
|
+
/** 由 autoLines 自动分配(没有显式写 lines)的线路条数 */
|
|
3738
|
+
autoAssignedLines: number
|
|
3739
|
+
/** 每一份最终接到哪些线路(含显式分配与自动分配) */
|
|
3740
|
+
lineAssignments: GisViewSplitPointLineAssignment[]
|
|
3704
3741
|
changes: GisViewSplitPointChangeSet | null
|
|
3705
3742
|
}
|
|
3706
3743
|
|
|
@@ -4480,12 +4517,11 @@ export interface GisViewLabelDragPayload {
|
|
|
4480
4517
|
state?: GisViewLabelState | null
|
|
4481
4518
|
/** 这一条标签对应的要素在不在当前选中集里 */
|
|
4482
4519
|
selected: boolean
|
|
4483
|
-
selection: GisViewSelectionInfo
|
|
4484
4520
|
/** 停手那一条带 true(说明这一路是拖过来而不是点选);start / move 上没有这个字段 */
|
|
4485
4521
|
moved?: boolean
|
|
4486
4522
|
/** 触发起手 / 移动 / 停手的原始指针事件(宿主按它读修饰键与指针位置) */
|
|
4487
4523
|
originalEvent?: PointerEvent | MouseEvent | null
|
|
4488
|
-
/** 这一次拖动的判读:type 为 'dragLabel'、target 为 'label'
|
|
4524
|
+
/** 这一次拖动的判读:type 为 'dragLabel'、target 为 'label';标签与 parent 读载荷顶层 */
|
|
4489
4525
|
action?: GisViewPointerAction
|
|
4490
4526
|
}
|
|
4491
4527
|
|
|
@@ -4505,15 +4541,14 @@ export interface GisViewLabelClickPayload {
|
|
|
4505
4541
|
/** 这一条当前的覆盖读数,没改过是 null */
|
|
4506
4542
|
state: GisViewLabelState | null
|
|
4507
4543
|
selected: boolean
|
|
4508
|
-
selection: GisViewSelectionInfo
|
|
4509
4544
|
/** 触发这一下的原始指针事件(点选是 pointerup;拖动路径里「没挪动」那条也是 pointerup) */
|
|
4510
4545
|
originalEvent?: PointerEvent | MouseEvent | null
|
|
4511
|
-
/** 这一次点选的判读:type 为 'selectLabel'、target 为 'label'
|
|
4546
|
+
/** 这一次点选的判读:type 为 'selectLabel'、target 为 'label';标签与 parent 读载荷顶层 */
|
|
4512
4547
|
action?: GisViewPointerAction
|
|
4513
4548
|
}
|
|
4514
4549
|
|
|
4515
4550
|
/**
|
|
4516
|
-
* 标签上的右键 / 双击载荷:与 labelClick 同一份读数(label / parent
|
|
4551
|
+
* 标签上的右键 / 双击载荷:与 labelClick 同一份读数(label / parent);指针位置、按键与修饰键读 originalEvent。
|
|
4517
4552
|
* `label.draggable` / `label.editable`(线路标签同一套开关)任开一个的标签都会发。
|
|
4518
4553
|
*/
|
|
4519
4554
|
export interface GisViewLabelPointerPayload {
|
|
@@ -4530,15 +4565,11 @@ export interface GisViewLabelPointerPayload {
|
|
|
4530
4565
|
/** 这一条当前的覆盖读数,没改过是 null */
|
|
4531
4566
|
state: GisViewLabelState | null
|
|
4532
4567
|
offset: [number, number]
|
|
4533
|
-
/**
|
|
4534
|
-
clientX: number
|
|
4535
|
-
clientY: number
|
|
4536
|
-
/** 原始 DOM 事件(contextmenu / dblclick):要 preventDefault 或读别的字段时用它 */
|
|
4568
|
+
/** 原始 DOM 事件(contextmenu / dblclick):指针位置、按键、修饰键都从这里读 */
|
|
4537
4569
|
originalEvent: MouseEvent | null
|
|
4538
4570
|
/** 这一条标签对应的要素在不在当前选中集里 */
|
|
4539
4571
|
selected: boolean
|
|
4540
|
-
|
|
4541
|
-
/** 这一次操作的判读:type 为 'contextMenu' / 'dblClick'、target 为 'label'、data 是这一条标签 */
|
|
4572
|
+
/** 这一次操作的判读:type 为 'contextMenu' / 'dblClick'、target 为 'label';标签与 parent 读载荷顶层 */
|
|
4542
4573
|
action?: GisViewPointerAction
|
|
4543
4574
|
}
|
|
4544
4575
|
|
|
@@ -6003,8 +6034,8 @@ export interface GisViewBatchOptions {
|
|
|
6003
6034
|
/**
|
|
6004
6035
|
* 全部可订阅事件(与 EVENT_NAMES 一致):事件名与 options 里的回调一一对应(`dataChange` 就是 `onDataChange`),
|
|
6005
6036
|
* 载荷也是同一份 —— 区别只在写法:`on` 可以挂多条、可以运行时订阅、返回的函数就是取消订阅。
|
|
6006
|
-
*
|
|
6007
|
-
*
|
|
6037
|
+
* 指针类事件(pointerDown / pointerUp / contextMenu)与回调收到的是同一份直接载荷,
|
|
6038
|
+
* 原始 DOM 事件看 payload.originalEvent。
|
|
6008
6039
|
*/
|
|
6009
6040
|
export interface GisViewEventMap {
|
|
6010
6041
|
/** 初始化完成:拿到画布与 WebGL 上下文 */
|
|
@@ -6019,9 +6050,9 @@ export interface GisViewEventMap {
|
|
|
6019
6050
|
cursor: GisViewCursorPayload
|
|
6020
6051
|
hover: GisViewHoverPayload
|
|
6021
6052
|
pointer: GisViewPointerState
|
|
6022
|
-
pointerDown:
|
|
6023
|
-
pointerUp:
|
|
6024
|
-
contextMenu:
|
|
6053
|
+
pointerDown: GisViewPointerPayload
|
|
6054
|
+
pointerUp: GisViewPointerPayload
|
|
6055
|
+
contextMenu: GisViewPointerPayload
|
|
6025
6056
|
click: GisViewClickPayload
|
|
6026
6057
|
/** 点中多成员聚合圆:不选中内部节点,普通 click 不会同时触发 */
|
|
6027
6058
|
clusterClick: GisViewClusterClickPayload
|
|
@@ -6569,11 +6600,21 @@ export interface GisViewOptions {
|
|
|
6569
6600
|
maxCanvasPixels?: number
|
|
6570
6601
|
ariaLabel?: string
|
|
6571
6602
|
onReady?: (payload: GisViewReadyPayload) => void
|
|
6603
|
+
/**
|
|
6604
|
+
* 本次选中操作:真实单击 / Ctrl 与 multiSelect 取反 / 框选 / selectAt 每次成功操作都发;
|
|
6605
|
+
* selectFeatures / deselect / focusOn({ select }) 等按引用接口只在选中集实际变化时发。
|
|
6606
|
+
* 清空与取反取没了时载荷是 null。onSelectChange 仍只在选中集实际变化时发。
|
|
6607
|
+
* 真实点击的派发顺序是 onClick → onSelect → onSelectChange;单通道选中时载荷顶层带
|
|
6608
|
+
* channelId / group / groups,多通道看 channelContexts。items 里的回线只带 channelId /
|
|
6609
|
+
* channelIndex / groupId / groupIndex 这些标量归属,不重复挂 group / groups;需要分组读数
|
|
6610
|
+
* 从顶层或 channelContexts 取。onSelect 与 onSelectChange 各自可独立订阅,两条载荷引用同一份
|
|
6611
|
+
* items 与分组数组,不会深拷贝;按只读使用,不要在回调里改载荷。
|
|
6612
|
+
*/
|
|
6572
6613
|
onSelect?: (payload: GisViewSelectPayload | null) => void
|
|
6573
6614
|
/** 单击要素或空白处 */
|
|
6574
6615
|
onClick?: (payload: GisViewClickPayload | null) => void
|
|
6575
6616
|
/** 点中多成员聚合圆:载荷带 count / pointIds / bounds;不会同时触发 onClick,也不改选中集 */
|
|
6576
|
-
onClusterClick?: (payload: GisViewClusterClickPayload
|
|
6617
|
+
onClusterClick?: (payload: GisViewClusterClickPayload) => void
|
|
6577
6618
|
/** 双击要素或空白处 */
|
|
6578
6619
|
onDblClick?: (payload: GisViewClickPayload | null) => void
|
|
6579
6620
|
/** 点了一下标签(label.editable / lineLabel.editable 打开时):载荷里是这一条标签的类型、下标与当前覆盖 */
|
|
@@ -6584,20 +6625,20 @@ export interface GisViewOptions {
|
|
|
6584
6625
|
onLabelChange?: (payload: GisViewLabelChangePayload) => void
|
|
6585
6626
|
/**
|
|
6586
6627
|
* 在标签上按右键(label.draggable / label.editable 任开一个时):载荷与 onLabelClick 同一份读数,
|
|
6587
|
-
*
|
|
6628
|
+
* 指针位置、按键与修饰键读 originalEvent。系统菜单按 preventContextMenu 收
|
|
6588
6629
|
*/
|
|
6589
6630
|
onLabelContextMenu?: (payload: GisViewLabelPointerPayload) => void
|
|
6590
6631
|
/** 双击标签(开关同上):载荷与 onLabelContextMenu 同一份(原始事件是 dblclick) */
|
|
6591
6632
|
onLabelDblClick?: (payload: GisViewLabelPointerPayload) => void
|
|
6592
|
-
/** 左键 / 中键 /
|
|
6593
|
-
onPointerDown?: (payload: GisViewPointerPayload
|
|
6633
|
+
/** 左键 / 中键 / 右键按下:命中的要素与光标位置在载荷里,原生的键 / 修饰键读 payload.originalEvent */
|
|
6634
|
+
onPointerDown?: (payload: GisViewPointerPayload) => void
|
|
6594
6635
|
/** 左键 / 中键 / 右键抬起:与 onPointerDown 成对 */
|
|
6595
|
-
onPointerUp?: (payload: GisViewPointerPayload
|
|
6636
|
+
onPointerUp?: (payload: GisViewPointerPayload) => void
|
|
6596
6637
|
/**
|
|
6597
6638
|
* 右键:点、线、通道、空白都会发这一条。命中通道回线时 action.target 为 'channel',
|
|
6598
6639
|
* 载荷另带 channelContext;要自己弹菜单就在这里 preventDefault()。
|
|
6599
6640
|
*/
|
|
6600
|
-
onContextMenu?: (payload: GisViewPointerPayload
|
|
6641
|
+
onContextMenu?: (payload: GisViewPointerPayload) => void
|
|
6601
6642
|
/** 点击级联高亮变了:载荷与 getCascadeHighlight() 同一份,收掉时是 null */
|
|
6602
6643
|
onCascadeHighlight?: (payload: GisViewCascadeHighlightInfo | null) => void
|
|
6603
6644
|
onHover?: (payload: GisViewHoverPayload) => void
|
|
@@ -6608,7 +6649,7 @@ export interface GisViewOptions {
|
|
|
6608
6649
|
onPointDrag?: (payload: GisViewPointDragPayload) => void
|
|
6609
6650
|
/**
|
|
6610
6651
|
* 复制节点:start / move / commit / end / cancel(复制到剪贴板时另有 clipboard)。
|
|
6611
|
-
* 在 commit 阶段可以 payload.cancel() 取消、payload.update()
|
|
6652
|
+
* 在 commit 阶段可以 payload.cancel() 取消、payload.update() 改数据,落地后 payload 里带 index 与最新 item
|
|
6612
6653
|
*/
|
|
6613
6654
|
onPointCopy?: (payload: GisViewPointCopyPayload | GisViewBatchCopyPayload) => void
|
|
6614
6655
|
/**
|
|
@@ -6644,8 +6685,11 @@ export interface GisViewOptions {
|
|
|
6644
6685
|
*/
|
|
6645
6686
|
onDataChange?: (payload: GisViewDataChangePayload) => void
|
|
6646
6687
|
/**
|
|
6647
|
-
*
|
|
6648
|
-
*
|
|
6688
|
+
* 选中集变化:覆盖所有来源(点击 / 框选 / selectFeatures / deselect / selectAt / selectInBox),
|
|
6689
|
+
* 且只在选中集真的变了时发一条;载荷带 ids / count / 各类型条数与来源 cause。
|
|
6690
|
+
* 与 onSelect 共用同一份选中集;需要「任何来源只通知一次」时优先订阅这一条。
|
|
6691
|
+
* 通道上下文与 onSelect 同一份:单通道摊平 channelId / group / groups,多通道给 channelContexts;
|
|
6692
|
+
* 不与 items 重复,两个事件共享同一批对象引用(按只读使用)。
|
|
6649
6693
|
*/
|
|
6650
6694
|
onSelectChange?: (payload: GisViewSelectChangePayload) => void
|
|
6651
6695
|
/**
|
|
@@ -6781,8 +6825,6 @@ export interface GisViewFocusOptions {
|
|
|
6781
6825
|
scale?: number
|
|
6782
6826
|
/** 显式要求按目标范围适应视图;**缺省不缩放**,只把中心移到目标上 */
|
|
6783
6827
|
zoom?: boolean
|
|
6784
|
-
/** 显式只居中、比例一点不动(与缺省行为一致,保留旧写法) */
|
|
6785
|
-
center?: boolean
|
|
6786
6828
|
/** 按范围适应视图(zoom: true)时四周的留白(CSS 像素),缺省 40 */
|
|
6787
6829
|
padding?: number
|
|
6788
6830
|
/** 适应视图(zoom: true)时最多放大到多少比例:单个节点 / 一条直线没有面积,靠它决定要不要放大 */
|
|
@@ -7620,8 +7662,8 @@ export interface GisViewInstance {
|
|
|
7620
7662
|
zoomToBounds(bounds: GisViewBounds, padding?: number): GisViewInstance
|
|
7621
7663
|
/**
|
|
7622
7664
|
* 把视角移到目标上(见 GisViewFocusTargets):一个或一批都行,一批时取整体包围盒 ——
|
|
7623
|
-
*
|
|
7624
|
-
*
|
|
7665
|
+
* 搜到三个节点就是这三个点之间的中心当屏幕中心。缺省只居中、比例不变;`{ zoom: true }`
|
|
7666
|
+
* 按目标范围适应视图(`padding` / `maxZoom` 可调),`{ scale }` 按给定比例居中,
|
|
7625
7667
|
* `{ select: true, mode }` 顺手把这些要素选上。认不出目标时什么都不做,返回实例便于链式调用。
|
|
7626
7668
|
*/
|
|
7627
7669
|
focusOn(target: GisViewFocusTargets, options?: GisViewFocusOptions): GisViewInstance
|
|
@@ -7739,14 +7781,22 @@ export interface GisViewInstance {
|
|
|
7739
7781
|
/**
|
|
7740
7782
|
* 按浏览器客户端坐标拾取(鼠标事件里的 clientX / clientY):与指针事件载荷同一份读数,另加 target
|
|
7741
7783
|
* ('point' / 'line' / 'channel')与 lngLat(配了 GeoJSON 底图才有);没命中返回 null。
|
|
7784
|
+
* 命中通道回线时给 group(当前这一组)与 groups(同一通道的全部分组)。
|
|
7742
7785
|
* 只读 —— 不改选中、不动光标。自建浮层 / 自定义菜单 / 拖拽放下时「问一下这儿是什么」用它
|
|
7743
7786
|
*/
|
|
7744
7787
|
pickAt(clientX: number, clientY: number): GisViewPickAtResult | null
|
|
7788
|
+
/**
|
|
7789
|
+
* 按客户端坐标做一次「普通单击选中」:与画布点击共用命中顺序与选中状态,
|
|
7790
|
+
* 通道回线按 channelSelectMode 摊开。空白 / 聚合圆返回 null 且不改选中。
|
|
7791
|
+
* 立即生效,不等待 selectTrigger: 'dblClick',也不派发 onClick / onDblClick;选中集实际变化时发
|
|
7792
|
+
* onSelect / onSelectChange。已知节点 / 线路 id 时直接用 selectFeatures,不必先求坐标。
|
|
7793
|
+
*/
|
|
7794
|
+
selectAt(clientX: number, clientY: number): GisViewSelectPayload | null
|
|
7745
7795
|
/**
|
|
7746
7796
|
* 程序化悬停(参数就是鼠标事件里的 clientX / clientY):让指针「停」到这个位置上 ——
|
|
7747
7797
|
* 悬停高亮、光标与 onHover 都按它更新(外部列表 / 表格 hover 到某一行时联动高亮图上的要素)。
|
|
7748
7798
|
* 不走悬停阈值,也不用先订阅一遍事件再把最近一次载荷记住;那儿没有命中要素时返回 null。
|
|
7749
|
-
* 返回的读数与 onHover 载荷同一份(action /
|
|
7799
|
+
* 返回的读数与 onHover 载荷同一份(action / lngLat 都补齐了)。想撤掉用 clearHover()
|
|
7750
7800
|
*/
|
|
7751
7801
|
hoverAt(clientX: number, clientY: number): GisViewHoverPayload | null
|
|
7752
7802
|
/** 取消程序化悬停:清掉高亮与读数并补发一条 onHover(null);没有悬停着的东西时什么都不做 */
|
|
@@ -7768,7 +7818,8 @@ export interface GisViewInstance {
|
|
|
7768
7818
|
getLineChannel(ref: GisViewFeatureRef): GisViewLineChannelInfo | null
|
|
7769
7819
|
/**
|
|
7770
7820
|
* 让一批东西变成选中状态(接口选中):与点击选中走同一份 state,因此 getSelections / getSelectionData
|
|
7771
|
-
*
|
|
7821
|
+
* 立刻就能读回来。会同步选中样式与读数;选中集实际变化时发 onSelect 与 onSelectChange(cause: api)。
|
|
7822
|
+
* 认这些写法(见 GisViewSelectionRef):
|
|
7772
7823
|
* ① 节点:id、`{ type: 'point', index: 3 }`、一批 id 与对象混着写;
|
|
7773
7824
|
* ② 通道:`{ type: 'channel', channelId: 'channel-a' }` 选整条通道的回线,
|
|
7774
7825
|
* `{ channelId, groupId }` / `{ type: 'group', channelId, groupId }` 选某一组
|
|
@@ -7789,11 +7840,22 @@ export interface GisViewInstance {
|
|
|
7789
7840
|
* 把这些从当前选中集里去掉,其余选中原样留着 —— `deselect('p-1')` 取消一个节点、
|
|
7790
7841
|
* `deselect({ type: 'channel', channelId: 'channel-a' })` 取消整条通道的回线。
|
|
7791
7842
|
* 一个目标都不给(不传 / 传 null)等于取消全部(与 selectFeatures(null) 同一件事),
|
|
7792
|
-
*
|
|
7843
|
+
* 传空数组是「没有目标」,什么都不做;认不出来的条目跳过。改变选中集时发
|
|
7844
|
+
* onSelect 与 onSelectChange(cause: api)。
|
|
7793
7845
|
*/
|
|
7794
7846
|
deselect(refs?: GisViewSelectionRefs): GisViewInstance
|
|
7795
|
-
/**
|
|
7847
|
+
/**
|
|
7848
|
+
* 当前选中集的原始条目(`{ type, index, item, ... }`),不做整理、不读包围盒。
|
|
7849
|
+
* 通道回线不带 channelId / channelIndex / groupId / groups;归属看选中事件的顶层
|
|
7850
|
+
* lineIndexes / channelContexts,或对单条线路调 getLineChannel()。
|
|
7851
|
+
*/
|
|
7796
7852
|
getSelections(): GisViewPickResult[]
|
|
7853
|
+
/**
|
|
7854
|
+
* 当前选中集的轻量计数:ids / count / points / lines / channels,与 onSelectChange 顶层的同名字段
|
|
7855
|
+
* 是同一份口径(通道回线按通道算一个)。指针 / 点击 / 悬停载荷不再重复挂 selection,需要这份读数时调它;
|
|
7856
|
+
* 结果按选中集引用缓存,十万级选中下也只是一次读取。要要素对象或包围盒时再用 getSelectionData()。
|
|
7857
|
+
*/
|
|
7858
|
+
getSelectionInfo(): GisViewSelectionInfo
|
|
7797
7859
|
/**
|
|
7798
7860
|
* 这一个要素在不在当前选中集里:`isSelected('p-1')` 按 id 问、
|
|
7799
7861
|
* `isSelected({ type: 'point', index: 3 })` 按下标问。
|
|
@@ -7804,7 +7866,7 @@ export interface GisViewInstance {
|
|
|
7804
7866
|
/**
|
|
7805
7867
|
* 当前画布上选中的数据(一次取全):ids / count 与各类型条数(通道回线按通道算一个)、
|
|
7806
7868
|
* 要素本身 points / lines / channels 三个数组、下标清单 pointIndexes / lineIndexes、
|
|
7807
|
-
* items(与 getSelections()
|
|
7869
|
+
* items(与 getSelections() 同一份,通道回线不重复挂通道字段)与世界包围盒 bounds(空选中时 null)。
|
|
7808
7870
|
* 单击、Ctrl 多选、框选与接口选中(selectFeatures / selectInBox)都是同一份 state,不挑选中来源;
|
|
7809
7871
|
* bounds 走一次 getElementBounds(十万级选中下约 5 ms),只想问「选了哪几个」用 getSelections() 更省
|
|
7810
7872
|
*/
|
|
@@ -7826,7 +7888,7 @@ export interface GisViewInstance {
|
|
|
7826
7888
|
commitPointCopy(): GisViewPointCopyPayload | null
|
|
7827
7889
|
/** 取消复制:预览撤掉,数据一直没动过 */
|
|
7828
7890
|
cancelPointCopy(): GisViewPointCopyPayload | null
|
|
7829
|
-
/** 改预览节点的数据(等价于回调里的 payload.update
|
|
7891
|
+
/** 改预览节点的数据(等价于回调里的 payload.update),返回改完的节点 */
|
|
7830
7892
|
updateCopyPoint(patch: Partial<GisViewPoint>): GisViewPoint | null
|
|
7831
7893
|
/** 当前复制状态:预览中 / 等选点;没有就返回 null */
|
|
7832
7894
|
getPointCopy(): GisViewPointCopyState | null
|
|
@@ -7867,10 +7929,12 @@ export interface GisViewInstance {
|
|
|
7867
7929
|
mergePoints(source: GisViewPointRef, target: GisViewPointRef, options?: { originalEvent?: Event | null; item?: GisViewPoint }): GisViewMergeOutcome
|
|
7868
7930
|
/**
|
|
7869
7931
|
* 把一个节点拆成多份(mergePoints 的逆操作):第一份复用原下标与 id,其余追加到 points 末尾。
|
|
7870
|
-
* 每份可直接写节点字段或放进 item;lines
|
|
7932
|
+
* 每份可直接写节点字段或放进 item;lines 显式分配线路,没写时默认跟第一份,
|
|
7933
|
+
* options.autoLines 为 'alternate' 时按「通道成组、独立线路单条」轮流分给负载最少的一份(解除合并推荐)。
|
|
7871
7934
|
* channels / channelFrom / channelTo 分配受影响通道的端点。没显式分配的通道跟随它第一条被分配过的成员线路。
|
|
7872
7935
|
* 拆分后自环 / 零长度线路与两端相同的通道删掉;整次调用只记一条历史、只发一条 `splitPoint` 数据变更。
|
|
7873
|
-
* 返回 `{ ok, items, indexes, pointIds, linesChanged, removedLines, channelsChanged, removedChannels,
|
|
7936
|
+
* 返回 `{ ok, items, indexes, pointIds, linesChanged, removedLines, channelsChanged, removedChannels,
|
|
7937
|
+
* autoLines, autoAssignedLines, lineAssignments, changes, skipped }`
|
|
7874
7938
|
*/
|
|
7875
7939
|
splitPoint(source: GisViewPointRef, parts: GisViewSplitPointPart[], options?: GisViewSplitPointOptions): GisViewSplitPointOutcome
|
|
7876
7940
|
/**
|
|
@@ -8004,10 +8068,18 @@ export interface GisViewInstance {
|
|
|
8004
8068
|
* (phase: 'ready',载荷里带两个节点、hasChannel / hasGroup / groups / channel 与可选方案)。
|
|
8005
8069
|
* 它只负责这条可视化示例路径 —— 真正的落地必须用 addChannel(或 addChannelGroupLines /
|
|
8006
8070
|
* joinChannelGroupLines / addLine),不在事件里落地就用 endAddChannel / cancelAddChannel 收掉假通道。
|
|
8007
|
-
*
|
|
8008
|
-
* options.select 打开「点节点时让节点选中」,options.handoff 让 ready
|
|
8071
|
+
* 新建独立线路请用 beginAddLine;options.circuits 决定一次加几回,
|
|
8072
|
+
* options.select 打开「点节点时让节点选中」,options.handoff 让 ready 之后草稿自动收掉。
|
|
8073
|
+
* options.singleChannel 打开单一通道模式;已有通道时 existingChannel 为 block / newGroup / joinGroup,
|
|
8074
|
+
* joinGroup 用 groupId / groupIndex 指名分组。没有已有通道时仍按新通道落地
|
|
8009
8075
|
*/
|
|
8010
8076
|
beginAddChannel(options?: GisViewChannelDraftOptions): GisViewInstance
|
|
8077
|
+
/**
|
|
8078
|
+
* 进入「新增线路」草稿:拾取、预览、连续新增和 beginAddChannel 同一套,kind 恒为 line。
|
|
8079
|
+
* 不写 existingChannel 时只新建独立线路;写 newGroup / joinGroup 时,如果两端已有通道,就把这次
|
|
8080
|
+
* 新建的回线放进新分组或指定分组(joinGroup 用 groupId / groupIndex 指名)。
|
|
8081
|
+
*/
|
|
8082
|
+
beginAddLine(options?: GisViewChannelDraftOptions): GisViewInstance
|
|
8011
8083
|
/** 当前新增通道草稿:两个节点的信息与可选方案,没有草稿时为 null */
|
|
8012
8084
|
getAddChannelDraft(): GisViewChannelDraftPayload | null
|
|
8013
8085
|
/** 改当前草稿的预览样式(字段级合并,传 null 回到全局 channelDraftStyle);没有草稿时什么也不做 */
|
|
@@ -8019,21 +8091,18 @@ export interface GisViewInstance {
|
|
|
8019
8091
|
/** 结束新增草稿并收掉视图上的示例假通道 / 线路(静默,不补 cancel):提前结束不新建就用它 */
|
|
8020
8092
|
endAddChannel(): GisViewInstance
|
|
8021
8093
|
/**
|
|
8022
|
-
* 提交已 ready 的新增草稿(autoCommit 时由组件内部调用)。input
|
|
8094
|
+
* 提交已 ready 的新增草稿(autoCommit 时由组件内部调用)。input 只有一类写法:
|
|
8023
8095
|
* 1. 不传 / null:用草稿的 preferred;
|
|
8024
|
-
* 2.
|
|
8025
|
-
* 3. 直接线路对象:无 lineIds,且有 from / to / path / kind: 'line' / start / end 之一;
|
|
8026
|
-
* 4. 直接通道对象:lineIds 为数组,缺省按 newChannel 落地;
|
|
8027
|
-
* 5. 容器:{ channel, line, lines, lineData, lineItems, channelGroups, group, channelProps, lineProps, resolution, ... }。
|
|
8096
|
+
* 2. 对象:{ channel, line, lines, lineData, channelGroups, group, channelProps, lineProps, resolution, ... }。
|
|
8028
8097
|
*
|
|
8029
|
-
* 字段优先级:from / to = 顶层 → channel → line →
|
|
8098
|
+
* 字段优先级:from / to = 顶层 → channel → line → lines 中第一个对象项 → 草稿;
|
|
8030
8099
|
* path = 顶层 → line → channel → 草稿;分组 = channelGroups → group → channel.groups;
|
|
8031
|
-
*
|
|
8032
|
-
* channelProps = 草稿 → channel 上的业务字段 → 顶层 channelProps。直接通道对象自己的 lineProps 会生效。
|
|
8100
|
+
* lineProps = 草稿 → 顶层 → line.lineProps → lines[i];channelProps = 草稿 → channel 上的业务字段 → 顶层 channelProps。
|
|
8033
8101
|
*
|
|
8034
|
-
*
|
|
8102
|
+
* 要并进已有通道 / 分组,显式写 resolution;直接通道 / 线路对象不再接受,请放进 channel / line。
|
|
8035
8103
|
* ready 里的方案对象带 enabled / count / lineIds 等读数,不能整条回传,只取
|
|
8036
8104
|
* `{ type, groupId, groupIndex, channelId }` 子集。调用前草稿必须 ready,否则返回 ok: false 且不写数据。
|
|
8105
|
+
* options.select 为 true 时落地后选中这次新建的全部回线,缺省不动选中集。
|
|
8037
8106
|
*
|
|
8038
8107
|
* ```ts
|
|
8039
8108
|
* view.commitAddChannel({
|
|
@@ -8044,8 +8113,8 @@ export interface GisViewInstance {
|
|
|
8044
8113
|
* ```
|
|
8045
8114
|
*/
|
|
8046
8115
|
commitAddChannel(
|
|
8047
|
-
input?:
|
|
8048
|
-
options?: { auto?: boolean; continuous?: boolean; originalEvent?: Event | null }
|
|
8116
|
+
input?: GisViewChannelAddCommitInput,
|
|
8117
|
+
options?: { auto?: boolean; continuous?: boolean; originalEvent?: Event | null; select?: boolean }
|
|
8049
8118
|
): GisViewChannelAddResult
|
|
8050
8119
|
/** 两个节点之间的新增方案:新通道 / 新分组 / 并进某一组 / 无法添加(kind 为 'line' 时方案表是空的) */
|
|
8051
8120
|
getChannelAddOptions(from: string | number, to: string | number, count?: number, kind?: 'channel' | 'line'): GisViewChannelAddPlan | null
|
|
@@ -8056,55 +8125,50 @@ export interface GisViewInstance {
|
|
|
8056
8125
|
*/
|
|
8057
8126
|
getChannelBetween(from: string | number, to: string | number): GisViewChannelBetween | null
|
|
8058
8127
|
/**
|
|
8059
|
-
*
|
|
8128
|
+
* 程序化新增一个通道:第一段是通道信息 `{ from, to, name, id, path, routing, channelProps }`,第二段是线路数据 ——
|
|
8060
8129
|
* 每条按自己的 id 建进通道(id 自动成为 lineIds),第三段是可选的分组信息。只负责新建一个通道:
|
|
8061
8130
|
* 两个节点之间已经有通道时整条失败(reason 指路 addChannelGroupLines / joinChannelGroupLines,
|
|
8062
|
-
* 结果里的 plan 带着 hasChannel / hasGroup / groups / channel
|
|
8063
|
-
*
|
|
8064
|
-
*/
|
|
8065
|
-
addChannel(channel: GisViewChannelAddSpec, lineData?: GisViewChannelLineData, group?: GisViewChannelAddGroup | GisViewChannelAddGroup[]): GisViewChannelAddResult
|
|
8066
|
-
/**
|
|
8067
|
-
* 新增通道 / 回线的旧写法(circuits / resolution / channelId / kind 那套):与从前完全一致 ——
|
|
8068
|
-
* 按方案表挑新通道 / 新分组 / 并入某组,kind 为 'line' 时加独立线路,circuits 是一次几回,
|
|
8069
|
-
* lineItems 是「连同线路一起新建」的第二段(一条或一批逐条属性,给了几条就建几条;
|
|
8070
|
-
* 每项也可以只写一个 id —— 裸字符串 / 数字按 { id } 收,与第二段 line_data 同一份口径)
|
|
8131
|
+
* 结果里的 plan 带着 hasChannel / hasGroup / groups / channel)。第二段不写时建一条自动编号回线;
|
|
8132
|
+
* options.select 为 true 时落地后选中新回线,options.emit: false 时不发数据变更。
|
|
8071
8133
|
*/
|
|
8072
|
-
addChannel(
|
|
8134
|
+
addChannel(channel: GisViewChannelAddSpec, lineData?: GisViewChannelLineData, group?: GisViewChannelAddGroup | GisViewChannelAddGroup[], options?: { emit?: boolean; select?: boolean }): GisViewChannelAddResult
|
|
8073
8135
|
/**
|
|
8074
8136
|
* 在已有通道里新加一组回线(原 addChannel 的 newGroup 那一支):第二段是这次新建的线路数组 line_data,
|
|
8075
8137
|
* 第三段可选 `{ id?, path? }` 给新分组的 id 与中间拐点(缺省 `${通道 id}::N`、不带拐点)
|
|
8076
8138
|
*/
|
|
8077
|
-
addChannelGroupLines(channelId: string | number, lineData?: GisViewChannelLineData, group?: GisViewChannelAddGroup): GisViewChannelAddResult
|
|
8139
|
+
addChannelGroupLines(channelId: string | number, lineData?: GisViewChannelLineData, group?: GisViewChannelAddGroup, options?: { emit?: boolean; select?: boolean }): GisViewChannelAddResult
|
|
8078
8140
|
/**
|
|
8079
|
-
* 在已有通道里一次新加多组回线:每一项 `{ id?, path?, lineData | lines
|
|
8141
|
+
* 在已有通道里一次新加多组回线:每一项 `{ id?, path?, lineData | lines }`,
|
|
8080
8142
|
* 逐组落地但只记一步历史、只发一条 addChannelGroups 数据变更
|
|
8081
8143
|
*/
|
|
8082
|
-
addChannelGroups(channelId: string | number, groups: GisViewChannelAddGroupInput | GisViewChannelAddGroupInput[], options?: { emit?: boolean; label?: string }): GisViewAddChannelGroupsResult
|
|
8144
|
+
addChannelGroups(channelId: string | number, groups: GisViewChannelAddGroupInput | GisViewChannelAddGroupInput[], options?: { emit?: boolean; select?: boolean; label?: string }): GisViewAddChannelGroupsResult
|
|
8083
8145
|
/**
|
|
8084
8146
|
* 把新回线并进已有通道的某一组(原 addChannel 的 joinGroup 那一支):groupId 认分组 id,也认序号
|
|
8085
8147
|
* (从 0 起、按声明顺序),不给就并进第一个还有余量的分组;第三段是这次新建的线路数组 line_data
|
|
8086
8148
|
*/
|
|
8087
|
-
joinChannelGroupLines(channelId: string | number, groupId: string | number | undefined, lineData?: GisViewChannelLineData): GisViewChannelAddResult
|
|
8149
|
+
joinChannelGroupLines(channelId: string | number, groupId: string | number | undefined, lineData?: GisViewChannelLineData, options?: { emit?: boolean; select?: boolean }): GisViewChannelAddResult
|
|
8088
8150
|
/**
|
|
8089
|
-
*
|
|
8090
|
-
*
|
|
8151
|
+
* 程序化新增独立线路(不挂通道):第一段给 from / to / name / id / lineProps / path / routing,
|
|
8152
|
+
* 第二段是线路数据(一条或一批,可以只写 id),不写就建一条按 from-to-序号自动编号的线路。
|
|
8153
|
+
* 落地走追加式引擎路径;options.select 为 true 时选中新回线,options.emit: false 时不发数据变更。
|
|
8091
8154
|
*/
|
|
8092
|
-
addLine(input:
|
|
8155
|
+
addLine(input: GisViewLineAddSpec, lineData?: GisViewChannelLineData, options?: { emit?: boolean; select?: boolean }): GisViewChannelAddResult
|
|
8093
8156
|
/**
|
|
8094
|
-
*
|
|
8157
|
+
* 一次新增多条通道(addChannel 的批量版,每条写法一致):逐条落地,但只重排一次场景、
|
|
8095
8158
|
* 只记一步历史、只发一条 `addChannels` 数据变更 —— 切场景时把接口里的通道一批批补进来用它。
|
|
8096
|
-
* `results` 与传入顺序一一对应,失败条目在自己的 reason 里说明原因;options.emit 传 false
|
|
8159
|
+
* `results` 与传入顺序一一对应,失败条目在自己的 reason 里说明原因;options.emit 传 false 时不发数据变更,
|
|
8160
|
+
* options.select 为 true 时最后一次性选中全部新回线
|
|
8097
8161
|
*/
|
|
8098
|
-
addChannels(input:
|
|
8162
|
+
addChannels(input: GisViewChannelAddSpec | GisViewChannelAddSpec[], options?: { emit?: boolean; select?: boolean }): GisViewAddChannelsResult
|
|
8099
8163
|
/**
|
|
8100
8164
|
* 往数据末尾追加一个节点 / 一批节点 / 一批线路(批量导入、从别处拷过来、按坐标补几条):
|
|
8101
8165
|
* 老数据一个都不动,返回 `{ ok, count, indexes, items }`(单条时另有 index 与 item)。
|
|
8102
8166
|
* 与 addChannel / addLine 的分工:那两条走「通道 / 草稿」那一套,这里是把现成的数据对象接在
|
|
8103
|
-
* points / lines 后面。options.emit 传 false
|
|
8167
|
+
* points / lines 后面。options.emit 传 false 时不发数据变更;options.select 为 true 时选中新要素
|
|
8104
8168
|
*/
|
|
8105
|
-
addPoint(item: GisViewPoint, options?: { emit?: boolean }): GisViewAddPointResult
|
|
8106
|
-
addPoints(items: GisViewPoint | GisViewPoint[], options?: { emit?: boolean }): GisViewAddItemsResult<GisViewPoint>
|
|
8107
|
-
addLines(items: GisViewLine | GisViewLine[], options?: { emit?: boolean }): GisViewAddItemsResult<GisViewLine>
|
|
8169
|
+
addPoint(item: GisViewPoint, options?: { emit?: boolean; select?: boolean }): GisViewAddPointResult
|
|
8170
|
+
addPoints(items: GisViewPoint | GisViewPoint[], options?: { emit?: boolean; select?: boolean }): GisViewAddItemsResult<GisViewPoint>
|
|
8171
|
+
addLines(items: GisViewLine | GisViewLine[], options?: { emit?: boolean; select?: boolean }): GisViewAddItemsResult<GisViewLine>
|
|
8108
8172
|
/** 移除一条线路(撤销刚落地的新增线路):挂在通道上的回线会从通道声明里一起摘掉,通道空了整条删掉 */
|
|
8109
8173
|
removeLine(lineId: string | number): GisViewRemoveLineResult
|
|
8110
8174
|
/** 一次移除多条线路(传数组):通道声明与分组跟着收拾,删空的通道整条走 */
|
|
@@ -8577,23 +8641,29 @@ export interface GisViewEngineOptions {
|
|
|
8577
8641
|
onCursor?: (coordinate: [number, number] | null) => void
|
|
8578
8642
|
onHover?: (payload: GisViewHoverPayload) => void
|
|
8579
8643
|
/**
|
|
8644
|
+
* 点击 / 框选路径(真实点击 / Ctrl 多选 / 框选(含 selectInBox)/ 空白清空)与 selectAt 每次成功操作都发;
|
|
8645
|
+
* selectFeatures / deselect / focusOn({ select }) 等按引用接口只在选中集实际变化时发。
|
|
8646
|
+
* 要统一监听所有来源并且避免点击同一要素时重复通知,请用 onSelectChange。
|
|
8647
|
+
* 真实点击的顺序是 onClick → onSelect → onSelectChange;Ctrl / multiSelect 取反与框选没有 onClick,
|
|
8648
|
+
* 顺序是 onSelect → onSelectChange。单通道选中时载荷顶层带 channelId / group / groups,多通道看 channelContexts。
|
|
8649
|
+
* items 里的回线只有标量归属,不重复挂 group / groups;两条回调共享同一批对象引用。
|
|
8580
8650
|
* 载荷为 null(没有选中任何要素)时的补充读数:mode 说明这一下是哪一种选中方式 ——
|
|
8581
8651
|
* 'multi' 是 Ctrl 点击取反取没了、'box' 是框选没框到东西;originalEvent 是那一次指针事件
|
|
8582
8652
|
* (载荷里没有它时靠这一份读修饰键)。其余清空路径不带第二个参数
|
|
8583
8653
|
*/
|
|
8584
|
-
onSelect?: (payload: GisViewSelectPayload | null, detail?: { mode?: 'single' | 'multi' | 'box'; originalEvent?: Event | null }) => void
|
|
8654
|
+
onSelect?: (payload: GisViewSelectPayload | null, detail?: { mode?: 'single' | 'multi' | 'box'; originalEvent?: Event | null; defer?: boolean }) => void
|
|
8585
8655
|
onClick?: (payload: GisViewClickPayload | null) => void
|
|
8586
8656
|
/** 点中多成员聚合圆(引擎不选中成员,普通点击回调不会同时触发) */
|
|
8587
|
-
onClusterClick?: (payload: GisViewClusterClickPayload
|
|
8657
|
+
onClusterClick?: (payload: GisViewClusterClickPayload) => void
|
|
8588
8658
|
onDblClick?: (payload: GisViewClickPayload | null) => void
|
|
8589
|
-
/** 左键 / 中键 /
|
|
8590
|
-
onPointerDown?: (payload: GisViewPointerPayload
|
|
8591
|
-
onPointerUp?: (payload: GisViewPointerPayload
|
|
8659
|
+
/** 左键 / 中键 / 右键按下与抬起:命中的要素与光标位置在载荷里,原生的键 / 修饰键读 payload.originalEvent */
|
|
8660
|
+
onPointerDown?: (payload: GisViewPointerPayload) => void
|
|
8661
|
+
onPointerUp?: (payload: GisViewPointerPayload) => void
|
|
8592
8662
|
/**
|
|
8593
8663
|
* 右键:点、线、通道、空白都会发这一条。命中通道回线时 action.target 为 'channel',
|
|
8594
8664
|
* 载荷另带 channelContext(几组 / 当前哪组 / 能做什么),不再有单独的通道路由。
|
|
8595
8665
|
*/
|
|
8596
|
-
onContextMenu?: (payload: GisViewPointerPayload
|
|
8666
|
+
onContextMenu?: (payload: GisViewPointerPayload) => void
|
|
8597
8667
|
/** 点击级联高亮变了:载荷与 getCascadeHighlight() 同一份,收掉时是 null */
|
|
8598
8668
|
onCascadeHighlight?: (payload: GisViewCascadeHighlightInfo | null) => void
|
|
8599
8669
|
onPointDrag?: (payload: GisViewPointDragPayload) => void
|
|
@@ -8628,8 +8698,10 @@ export interface GisViewEngine {
|
|
|
8628
8698
|
describe(selection: GisViewFeatureKey): GisViewPickResult | null
|
|
8629
8699
|
/** 批量把要素下标还原成拾取结果,框选与受控选中都用它 */
|
|
8630
8700
|
describeAll(selection: GisViewFeatureKey[]): GisViewPickResult[]
|
|
8631
|
-
/**
|
|
8632
|
-
|
|
8701
|
+
/** 批量还原并补通道上下文:单通道摊平 channelId / group / groups,多通道给 channelContexts */
|
|
8702
|
+
describeSelection(selection: GisViewFeatureKey[], preferredGroupId?: string | number): GisViewDescribedSelection
|
|
8703
|
+
/** 按画布 CSS 像素矩形框选,返回框内要素 */
|
|
8704
|
+
selectInBox(box: GisViewRect, options?: GisViewSelectInBoxOptions): GisViewPickResult[]
|
|
8633
8705
|
/** 拐点增删改,insertIndex 缺省时按直线上离目标最近的线段插入 */
|
|
8634
8706
|
insertWaypoint(lineIndex: number, coordinate: GisViewCoordinate, insertIndex?: number): GisViewWaypointPayload | null
|
|
8635
8707
|
/** 删除指定线路上的拐点 */
|
|
@@ -8707,15 +8779,24 @@ export interface GisViewEngine {
|
|
|
8707
8779
|
beginChannelDraft(options?: GisViewChannelDraftOptions): GisViewChannelDraftPayload | null
|
|
8708
8780
|
/** 当前草稿:两个节点的信息与可选方案,没有草稿时为 null */
|
|
8709
8781
|
getChannelDraft(): GisViewChannelDraftPayload | null
|
|
8710
|
-
/** 连续新增:一段落地之后原地重开一段草稿(chain 为 true
|
|
8782
|
+
/** 连续新增:一段落地之后原地重开一段草稿(chain 为 true 时以上一段终点当新起点) */
|
|
8711
8783
|
restartChannelDraft(options?: {
|
|
8712
8784
|
chain?: boolean
|
|
8713
|
-
|
|
8785
|
+
/** 重开上一段时也可以预指定起点(与 beginChannelDraft 的 from 同一份写法) */
|
|
8786
|
+
from?: GisViewPointRef
|
|
8787
|
+
singleChannel?: boolean
|
|
8788
|
+
existingChannel?: GisViewChannelExistingMode
|
|
8789
|
+
groupId?: string | number
|
|
8790
|
+
groupIndex?: number
|
|
8714
8791
|
circuits?: number
|
|
8792
|
+
/** 换这一段草稿的第二段线路数据;给了几条就按几条对齐 circuits */
|
|
8793
|
+
lineData?: GisViewChannelLineData
|
|
8715
8794
|
/** 换这一段草稿的预览样式(字段级合并;null 回到全局 channelDraftStyle,不传就沿用) */
|
|
8716
8795
|
channelDraftStyle?: GisViewChannelDraftStyle | null
|
|
8717
8796
|
/** 换一份逐条回线的属性(不传就沿用这一段草稿原来的) */
|
|
8718
8797
|
linePropsByMember?: Array<Partial<GisViewLine> | undefined>
|
|
8798
|
+
routing?: 'straight' | 'orthogonal'
|
|
8799
|
+
path?: GisViewCoordinate[]
|
|
8719
8800
|
/** 换这一段草稿的交接模式(不传就沿用) */
|
|
8720
8801
|
handoff?: boolean
|
|
8721
8802
|
/** 换这一段草稿的「点节点时让节点选中」(不传就沿用) */
|
|
@@ -8856,6 +8937,8 @@ export interface GisViewEngine {
|
|
|
8856
8937
|
pick(x: number, y: number): GisViewHitResult | null
|
|
8857
8938
|
/** 与组件实例的 pickAt 同一份:按浏览器客户端坐标拾取(引擎不等 DOM 事件,直接给 clientX / clientY) */
|
|
8858
8939
|
pickAtClient(clientX: number, clientY: number): GisViewHitResult | null
|
|
8940
|
+
/** 与组件实例的 selectAt 同一份:按客户端坐标走一次普通单击选中(通道按 channelSelectMode 摊开) */
|
|
8941
|
+
selectAtClient(clientX: number, clientY: number): GisViewSelectPayload | null
|
|
8859
8942
|
/** 程序化悬停(客户端坐标):让指针「停」在这儿,悬停高亮 / 光标 / onHover 一起更新,返回这一次的读数 */
|
|
8860
8943
|
hoverAtClient(clientX: number, clientY: number): GisViewHoverPayload | null
|
|
8861
8944
|
/** 取消程序化悬停:清掉高亮与读数并补发 onHover(null) */
|