Skip to content

Commit

Permalink
Support BrushLink part2
Browse files Browse the repository at this point in the history
  • Loading branch information
lixun910 committed May 7, 2024
1 parent e619c43 commit 164d2f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/src/editor/editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ interface EditorProps {
onSetEditorMode: (m: any) => void;
onDeleteFeature: (f: Feature) => any;
onTogglePolygonFilter: (l: Layer, f: Feature) => any;
setBrushAndLink?: (layers: Layer[], editFeature: Feature) => any;
}

export type PortalEditorProps = FeatureActionPanelProps & {
Expand Down Expand Up @@ -165,6 +166,7 @@ export default function EditorFactory(
const {selectedFeature} = editor;
if (selectedFeature) {
this.props.onDeleteFeature(selectedFeature);
this.props.setBrushAndLink?.(this.props.layers, selectedFeature);
}
};

Expand Down
1 change: 1 addition & 0 deletions src/components/src/map-container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,7 @@ export default function MapContainerFactory(
filters={this.polygonFiltersSelector(this.props)}
layers={layers}
onDeleteFeature={visStateActions.deleteFeature}
setBrushAndLink={visStateActions.setBrushAndLink}
onSelect={visStateActions.setSelectedFeature}
onTogglePolygonFilter={visStateActions.setPolygonFilterLayer}
onSetEditorMode={visStateActions.setEditorMode}
Expand Down

0 comments on commit 164d2f8

Please sign in to comment.