diff --git a/web/package.json b/web/package.json index e22cd09970..a87ab78880 100644 --- a/web/package.json +++ b/web/package.json @@ -124,7 +124,7 @@ "@lexical/utils": "0.12.0", "@monaco-editor/react": "4.6.0", "@popperjs/core": "2.11.8", - "@reearth/core": "0.0.7-alpha.14", + "@reearth/core": "0.0.7-alpha.15", "@rot1024/use-transition": "1.0.0", "@sentry/browser": "7.77.0", "@seznam/compose-react-refs": "1.0.6", diff --git a/web/src/beta/features/Editor/Map/InspectorPanel/LayerInspector/FeatureInspector/index.tsx b/web/src/beta/features/Editor/Map/InspectorPanel/LayerInspector/FeatureInspector/index.tsx index ccba0c1f1d..4cc35f5324 100644 --- a/web/src/beta/features/Editor/Map/InspectorPanel/LayerInspector/FeatureInspector/index.tsx +++ b/web/src/beta/features/Editor/Map/InspectorPanel/LayerInspector/FeatureInspector/index.tsx @@ -25,6 +25,10 @@ type Props = { sketchFeature?: SketchFeature; onGeoJsonFeatureUpdate?: (inp: GeoJsonFeatureUpdateProps) => void; onGeoJsonFeatureDelete?: (inp: GeoJsonFeatureDeleteProps) => void; + isEditingGeometry?: boolean; + onSketchGeometryEditStart?: () => void; + onSketchGeometryEditApply?: () => void; + onSketchGeometryEditCancel?: () => void; }; export type ValueProp = string | number | boolean | undefined; @@ -40,7 +44,11 @@ const FeatureData: FC = ({ layer, sketchFeature, onGeoJsonFeatureUpdate, - onGeoJsonFeatureDelete + onGeoJsonFeatureDelete, + isEditingGeometry, + onSketchGeometryEditStart, + onSketchGeometryEditApply, + onSketchGeometryEditCancel }) => { const t = useT(); const theme = useTheme(); @@ -110,6 +118,7 @@ const FeatureData: FC = ({ newProperties, ...fields.map((f) => ({ [f.title]: f.value })) ); + onGeoJsonFeatureUpdate?.({ layerId: layer.id, featureId: sketchFeature.id, @@ -144,6 +153,42 @@ const FeatureData: FC = ({ return ( + {!!layer?.isSketch && sketchFeature?.id && ( + + {isEditingGeometry ? ( + <> +