From e2f3702e0adc6af5963b7521513abc4ac582b52d Mon Sep 17 00:00:00 2001 From: Tim Nyborg Date: Thu, 9 Mar 2023 09:23:02 +0000 Subject: [PATCH 1/2] Correct onEdit typing Brings it into line with https://github.com/uber/nebula.gl/blob/a3f81bb6476b36a34a20359c97046c3a75b3ecdd/modules/edit-modes/src/types.ts#L129 --- modules/layers/src/layers/editable-geojson-layer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/layers/src/layers/editable-geojson-layer.ts b/modules/layers/src/layers/editable-geojson-layer.ts index d414dabf9..aab69ec12 100644 --- a/modules/layers/src/layers/editable-geojson-layer.ts +++ b/modules/layers/src/layers/editable-geojson-layer.ts @@ -111,7 +111,7 @@ export type EditableGeojsonLayerProps = EditableLayerProps & mode?: any; modeConfig?: any; selectedFeatureIndexes?: number[]; - onEdit?: (updatedData?, editType?: string, featureIndexes?: number[], editContext?) => void; + onEdit?: (editAction: EditAction) => void; pickable?: boolean; pickingRadius?: number; From 94d2faf735d5ade41785ac96b3207af3b98c7cd0 Mon Sep 17 00:00:00 2001 From: Tim Nyborg Date: Tue, 14 Mar 2023 18:00:36 +0000 Subject: [PATCH 2/2] correct onEdit on EditableH3ClusterLayerProps --- modules/layers/src/layers/editable-h3-cluster-layer.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/layers/src/layers/editable-h3-cluster-layer.ts b/modules/layers/src/layers/editable-h3-cluster-layer.ts index ea222e706..0230fb53d 100644 --- a/modules/layers/src/layers/editable-h3-cluster-layer.ts +++ b/modules/layers/src/layers/editable-h3-cluster-layer.ts @@ -2,7 +2,7 @@ import { H3ClusterLayer } from '@deck.gl/geo-layers'; import { DefaultProps } from '@deck.gl/core/typed'; -import { ViewMode } from '@nebula.gl/edit-modes'; +import { EditAction, ViewMode } from '@nebula.gl/edit-modes'; import { polyfill, geoToH3 } from 'h3-js'; import { PROJECTED_PIXEL_SIZE_MULTIPLIER } from '../constants'; import EditableGeoJsonLayer from './editable-geojson-layer'; @@ -22,7 +22,7 @@ export type EditableH3ClusterLayerProps = EditableLayerProps & { selectedIndexes?: number[]; getEditedCluster?: (updatedHexagons: any[], existingCluster: any) => any; getHexagons?: (d) => number[]; - onEdit?: (updatedData?, editType?: string, featureIndexes?: number[], editContext?) => void; + onEdit?: (editAction: EditAction) => void; filled?: boolean; stroked?: boolean; lineWidthScale?: number;