feat: editor improvements and collapsible sidebars
Add collapse/expand toggle for the AppShell navigation sidebar and the editor properties panel (both persisted to localStorage). Bundles other in-progress editor work including position anchors, outlet sizing, PBR textures, window slope/frame depth, curtain metadata, and various 2D/3D rendering tweaks.
This commit is contained in:
@@ -32,6 +32,9 @@ model Room {
|
||||
posY Float @default(0)
|
||||
floorType String @default("CONCRETE")
|
||||
wallColor String @default("#f5f0eb")
|
||||
wallFinish String @default("PAINT")
|
||||
outletWidth Float @default(0.07)
|
||||
outletHeight Float @default(0.07)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
apartment Apartment @relation(fields: [apartmentId], references: [id], onDelete: Cascade)
|
||||
@@ -39,6 +42,7 @@ model Room {
|
||||
openings WallOpening[]
|
||||
electricalItems ElectricalItem[]
|
||||
furnitureItems FurnitureItem[]
|
||||
annotations Annotation[]
|
||||
|
||||
@@index([apartmentId])
|
||||
}
|
||||
@@ -68,6 +72,12 @@ model WallOpening {
|
||||
height Float
|
||||
elevationFromFloor Float @default(0)
|
||||
openDirection String @default("LEFT") // LEFT, RIGHT, INWARD, OUTWARD
|
||||
anchorH String @default("middle") // left, middle, right (positionAlongWall = center by default)
|
||||
anchorV String @default("bottom") // top, middle, bottom (elevationFromFloor = bottom edge by default)
|
||||
gridCols Int @default(2) // window pane subdivision — columns
|
||||
gridRows Int @default(2) // window pane subdivision — rows
|
||||
slopeDepth Float @default(0) // window reveal (откос) depth in meters; 0 = no slope shown
|
||||
frameThickness Float @default(0.03) // door/window frame member thickness in meters
|
||||
room Room @relation(fields: [roomId], references: [id], onDelete: Cascade)
|
||||
wall Wall @relation(fields: [wallId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@ -84,6 +94,10 @@ model ElectricalItem {
|
||||
wallId String?
|
||||
elevationFromFloor Float?
|
||||
rotation Float @default(0)
|
||||
count Int @default(1)
|
||||
anchorH String @default("middle") // left, middle, right
|
||||
anchorV String @default("middle") // top, middle, bottom
|
||||
label String? // user-supplied display name; falls back to symbol def label when null
|
||||
metadata String? // JSON
|
||||
room Room @relation(fields: [roomId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@ -102,7 +116,28 @@ model FurnitureItem {
|
||||
rotation Float @default(0)
|
||||
elevationFromFloor Float @default(0)
|
||||
label String?
|
||||
anchorH String @default("middle") // left, middle, right
|
||||
anchorV String @default("middle") // top, middle, bottom
|
||||
showProjection Boolean @default(false)
|
||||
opacity Float @default(1)
|
||||
metadata String? // JSON — type-specific extension bag (e.g. curtain open amount + fabric color)
|
||||
room Room @relation(fields: [roomId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@index([roomId])
|
||||
}
|
||||
|
||||
model Annotation {
|
||||
id String @id @default(cuid())
|
||||
roomId String
|
||||
x Float @default(0)
|
||||
y Float @default(0)
|
||||
text String
|
||||
fontSize Int?
|
||||
color String?
|
||||
attachedToId String?
|
||||
projectionOffsetX Float?
|
||||
projectionOffsetY Float?
|
||||
room Room @relation(fields: [roomId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@index([roomId])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user