feat: floor plan viewport rendering, per-canvas config, server media upload
- Render floor plan inside React Flow ViewportPortal so it pans/zooms with nodes (was screen-fixed, desynced on pan/zoom); zoom-stable resize handles. - Move floor plan config from the left panel into the canvas (design) edit modal; attach per-design and fix cross-design bleed on load. - Store images via a new generic backend media endpoint (POST/GET/DELETE /api/v1/media) on disk under <data_dir>/uploads, not base64 in the canvas. - Disable floor plans in standalone mode (no backend to upload/serve); drop base64 localStorage persistence. See ADR-001 in CLAUDE.md. - Tests: backend media route, DesignModal floor plan + upload, store floorMap. ha-relevant: maybe
This commit is contained in:
@@ -254,6 +254,11 @@ export interface CustomStyleDef {
|
||||
}
|
||||
|
||||
export interface FloorMapConfig {
|
||||
/**
|
||||
* Server URL of the uploaded image (e.g. /api/v1/media/<uuid>.png).
|
||||
* Legacy canvases may still hold a base64 `data:` URL — both render in <img>.
|
||||
* Floor plans require a backend; they are disabled in standalone mode.
|
||||
*/
|
||||
imageData: string
|
||||
posX: number
|
||||
posY: number
|
||||
|
||||
Reference in New Issue
Block a user