spatial-monorepo / editor/src / SpatialEditorProps
Interface: SpatialEditorProps
Defined in: packages/editor/src/SpatialEditor.tsx:70
Properties
building?
optionalbuilding?:object
Defined in: packages/editor/src/SpatialEditor.tsx:86
Issue #782 — homography is the source building's row-major 3×3 matrix (same shape as BuildingOption.homography), used as srcHomography for copy-to-building's cross-building reprojection.
homography?
optionalhomography?:number[]
id
id:
string
name?
optionalname?:string
buildings?
optionalbuildings?:BuildingOption[]
Defined in: packages/editor/src/SpatialEditor.tsx:103
Buildings available for copy-to-building (F17 / issue #185).
children?
optionalchildren?:ReactNode
Defined in: packages/editor/src/SpatialEditor.tsx:113
floors?
optionalfloors?:Floor[]
Defined in: packages/editor/src/SpatialEditor.tsx:101
Floors available for copy-to-floor (F16).
initialMode?
optionalinitialMode?:EditorMode
Defined in: packages/editor/src/SpatialEditor.tsx:90
map?
optionalmap?:Map$1|null
Defined in: packages/editor/src/SpatialEditor.tsx:82
The MapLibre map instance the editor draws on. Wall/door/fixture clicks, Terra Draw's drawing modes, the image-snap floor-plan drop, and the OSM outline / wall-extrusion layers all no-op without one.
Issue #427 — policy default: when omitted, SpatialEditor falls back to useSpatialMap() so it can be embedded directly inside a <SpatialMap> without any extra wiring. An explicit map prop always takes precedence over the context value, so SpatialEditor also works standalone (e.g. in Storybook, or against a map mounted outside of <SpatialMap>).
onFloorPlanAlphaChange?
optionalonFloorPlanAlphaChange?: (alpha) =>void
Defined in: packages/editor/src/SpatialEditor.tsx:97
Called when the opacity slider changes (0–1).
Parameters
alpha
number
Returns
void
onFloorPlanElevationCmChange?
optionalonFloorPlanElevationCmChange?: (cm) =>void
Defined in: packages/editor/src/SpatialEditor.tsx:99
Called when the elevation-in-cm input changes.
Parameters
cm
number
Returns
void
onMVFImport?
optionalonMVFImport?: (archive) =>void
Defined in: packages/editor/src/SpatialEditor.tsx:105
Called when an MVF file is successfully dropped and imported (issue #409).
Parameters
archive
IMDFArchive
Returns
void
onSave?
optionalonSave?: (features) =>void|Promise`<void>`
Defined in: packages/editor/src/SpatialEditor.tsx:87
Parameters
features
Feature`<Geometry, GeoJsonProperties>`[]
Returns
void | Promise`<void>`
onValidationFeatureClick?
optionalonValidationFeatureClick?: (featureId) =>void
Defined in: packages/editor/src/SpatialEditor.tsx:93
Called when a violation row is clicked — receives the featureId for click-to-zoom.
Parameters
featureId
string
Returns
void
pdfWorkerSrc?
optionalpdfWorkerSrc?:string
Defined in: packages/editor/src/SpatialEditor.tsx:112
Override for pdfjs-dist's worker script URL, forwarded to usePDFDrop. Only needed by consumers whose bundler doesn't special-case new URL('pdfjs-dist/build/pdf.worker.min.mjs', import.meta.url) (issue #445). See usePDFDrop's pdfWorkerSrc option for details.
showAssetPanel?
optionalshowAssetPanel?:boolean
Defined in: packages/editor/src/SpatialEditor.tsx:89
showFloorPlanControls?
optionalshowFloorPlanControls?:boolean
Defined in: packages/editor/src/SpatialEditor.tsx:95
Show floor-plan opacity + elevation controls (for use alongside HomographyLayer).
showLayerPanel?
optionalshowLayerPanel?:boolean
Defined in: packages/editor/src/SpatialEditor.tsx:88
validation?
optionalvalidation?:"none"|"microsoft-places"|"apple-imdf"
Defined in: packages/editor/src/SpatialEditor.tsx:91
