From f55b0f47f6c0f9527875fd19e0de2c040af0703d Mon Sep 17 00:00:00 2001 From: hu de yi Date: Wed, 24 Jul 2024 10:24:46 +0800 Subject: [PATCH] Geometry edit fire handledremove event when control vertext remove (#2382) * Geometry edit fire handledremove event when control vertext remove * fix typo * fix typo --- src/geometry/editor/GeometryEditor.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/geometry/editor/GeometryEditor.ts b/src/geometry/editor/GeometryEditor.ts index 62f77b9274..0ce1cb99c6 100644 --- a/src/geometry/editor/GeometryEditor.ts +++ b/src/geometry/editor/GeometryEditor.ts @@ -987,6 +987,16 @@ class GeometryEditor extends Eventable(Class) { } onVertexAddOrRemove(); me._updating = false; + + /** + * changed geometry shape event, fired when edit control vertex remove + * + * @event Geometry#handleremove + * @type {Object} + * @property {String} type - handleremove + * @property {Geometry} target - the geometry fires the event + */ + me._geometry.fire('handleremove', Object.assign({}, param, { coordinate: map.containerPointToCoordinate(param.containerPoint), vertex: param.target })); } function moveVertexHandle(handleConatainerPoint: any, index: number, ringIndex: number = 0): void {