fix: Add row/col/tier to mock 3D data so Racks actually render
This commit is contained in:
parent
d4bbc33c64
commit
0d82bb0db4
1 changed files with 15 additions and 5 deletions
|
|
@ -41,11 +41,21 @@ export function Room3DViewer({ room, visMode = 'STANDARD', onPlantClick }: Room3
|
||||||
posY: 10, // Centered Y roughly
|
posY: 10, // Centered Y roughly
|
||||||
width: 4,
|
width: 4,
|
||||||
height: 20,
|
height: 20,
|
||||||
positions: Array.from({ length: 16 }).map((__, p) => ({
|
positions: Array.from({ length: 16 }).map((__, p) => {
|
||||||
|
const tier = Math.floor(p / 4);
|
||||||
|
const remainder = p % 4;
|
||||||
|
const row = Math.floor(remainder / 2);
|
||||||
|
const column = remainder % 2;
|
||||||
|
return {
|
||||||
id: `p-${i}-${p}`,
|
id: `p-${i}-${p}`,
|
||||||
name: `P${p + 1}`,
|
name: `P${p + 1}`,
|
||||||
valid: true
|
valid: true,
|
||||||
}))
|
tier,
|
||||||
|
row,
|
||||||
|
column,
|
||||||
|
sectionId: `mock-rack-${i}` // Adding sectionId for completeness if needed
|
||||||
|
};
|
||||||
|
})
|
||||||
}));
|
}));
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue