Appearance
Documentation / @geoverse/editor-core / collectVertexHandles
Function: collectVertexHandles()
ts
function collectVertexHandles(features): FeatureCollection<Point>;Defined in: packages/editor-core/src/geometry/vertices.ts:28
从可编辑要素集合提取顶点句柄(统一 OL / Libre 两端的句柄位置与语义, 呼应 RFC「两端同一吸附内核」的既定方向)。
- Point 取单点;LineString 取全部顶点;Polygon 逐环、跳过闭合重复点(首尾相同);
- Multi* / GeometryCollection 暂不展开——与可编辑范围一致(MoveVertex 仅 LineString/Polygon)。
纯函数、无地图库依赖,可 node 单测。每个句柄 properties 携带 VertexHandleRef, 适配器据此做拖拽/删除命中;句柄的视觉层级(主动可编辑 vs 被动展示)由适配器另行决定。
Parameters
features
Returns
FeatureCollection<Point>
