diff --git a/packages/nodes/src/door/panel.tsx b/packages/nodes/src/door/panel.tsx index 001ff37f..e6b4ba5d 100644 --- a/packages/nodes/src/door/panel.tsx +++ b/packages/nodes/src/door/panel.tsx @@ -390,21 +390,37 @@ export default function DoorPanel() { const openingRevealRadius = node.openingRevealRadius ?? 0.025 const maxRoundedRadius = Math.max(0.01, Math.min(node.width / 2, node.height)) const doorType = node.doorType ?? 'hinged' - const isSwingDoor = doorType === 'hinged' || doorType === 'double' || doorType === 'french' - const isSlidingDoor = doorType === 'pocket' || doorType === 'barn' || doorType === 'sliding' const isGarageDoor = node.doorCategory === 'garage' || doorType.startsWith('garage-') + const isSwingDoor = doorType === 'hinged' || doorType === 'double' || doorType === 'french' + const isSlideFoldDoor = + doorType === 'folding' || + doorType === 'pocket' || + doorType === 'barn' || + doorType === 'sliding' + const isSlidingDoor = doorType === 'pocket' || doorType === 'barn' || doorType === 'sliding' + const isFoldingDoor = doorType === 'folding' const isSectionalGarageDoor = doorType === 'garage-sectional' const isRollupGarageDoor = doorType === 'garage-rollup' const isTiltupGarageDoor = doorType === 'garage-tiltup' - const typeMode = isOpening ? 'opening' : isGarageDoor ? 'garage' : 'door' + const isCutoutOnly = isOpening + const typeMode = isCutoutOnly ? 'opening' : isGarageDoor ? 'garage' : 'door' const supportsHingeSide = doorType === 'hinged' const supportsHandleSide = doorType === 'hinged' - const supportsTopShape = - !isGarageDoor && - doorType !== 'folding' && - doorType !== 'pocket' && - doorType !== 'barn' && - doorType !== 'sliding' + const supportsTopShape = isSwingDoor + const showFlipSide = !isCutoutOnly + const showFoldSection = isFoldingDoor && !isCutoutOnly + const showSlideSection = isSlidingDoor && !isCutoutOnly + const showGarageSection = + (isSectionalGarageDoor || isRollupGarageDoor || isTiltupGarageDoor) && !isCutoutOnly + const showOpeningShapeSection = isCutoutOnly + const showDoorShapeSection = !isCutoutOnly && supportsTopShape + const showFrameSection = !isCutoutOnly + const showContentPaddingSection = !isCutoutOnly && !isGarageDoor + const showSwingSection = isSwingDoor + const showThresholdSection = isSwingDoor + const showHandleSection = isSwingDoor + const showHardwareSection = isSwingDoor + const showSegmentsSection = !isCutoutOnly && !isGarageDoor const maxDoorWidth = isGarageDoor ? 6 : 3 const setOpeningTopRadius = (index: number, value: number, commit = false) => { @@ -679,7 +695,7 @@ export default function DoorPanel() { unit="m" value={Math.round(node.position[0] * 100) / 100} /> - {!isOpening && ( + {showFlipSide && (
- {doorType === 'folding' && !isOpening && ( + {showFoldSection && (
@@ -722,7 +738,7 @@ export default function DoorPanel() { )} - {isSlidingDoor && !isOpening && ( + {showSlideSection && (
@@ -753,7 +769,7 @@ export default function DoorPanel() { )} - {(isSectionalGarageDoor || isRollupGarageDoor || isTiltupGarageDoor) && !isOpening && ( + {showGarageSection && ( - {!isOpening && supportsTopShape && ( + {showDoorShapeSection && (
)} - {isOpening && ( + {showOpeningShapeSection && (
)} - {!isOpening && ( + {!isCutoutOnly && ( <> - + {showFrameSection && ( + - + + )} - {!isGarageDoor && ( + {showContentPaddingSection && ( )} - {isSwingDoor && ( + {showSwingSection && (
{supportsHingeSide && ( @@ -1092,7 +1110,7 @@ export default function DoorPanel() { )} - {isSwingDoor && ( + {showThresholdSection && ( )} - {!isGarageDoor && ( + {showHandleSection && ( {isSwingDoor && ( )} - {isSwingDoor && ( + {showHardwareSection && ( )} - {!isGarageDoor && ( + {showSegmentsSection && ( {node.segments.map((seg, i) => { const numCols = seg.columnRatios.length