Skip to content

Commit

Permalink
added circleResizeEnd onEdit callback no notify when dragging ended. …
Browse files Browse the repository at this point in the history
…Changed editing callback for circle resize from unionGeometry to circleResize
  • Loading branch information
KristerL committed Apr 28, 2021
1 parent 17aa199 commit e9ab0c9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion modules/edit-modes/src/lib/resize-circle-mode.ts
Expand Up @@ -152,7 +152,7 @@ export class ResizeCircleMode extends GeoJsonEditMode {

props.onEdit({
updatedData,
editType: 'unionGeometry',
editType: 'circleResize',
editContext: {
featureIndexes: [editHandleProperties.featureIndex],
},
Expand Down Expand Up @@ -181,6 +181,14 @@ export class ResizeCircleMode extends GeoJsonEditMode {

handleStopDragging(event: StopDraggingEvent, props: ModeProps<FeatureCollection>) {
if (this._isResizing) {
props.onEdit({
updatedData: props.data,
editType: 'circleResizeEnd',
editContext: {
featureIndexes: props.selectedIndexes,
},
});

this._selectedEditHandle = null;
this._isResizing = false;
}
Expand Down

0 comments on commit e9ab0c9

Please sign in to comment.