Standardize stair controls on slider inputs

This commit is contained in:
sudhir
2026-04-28 14:50:51 +05:30
parent 1c2746f538
commit 15daeaace6
4 changed files with 9 additions and 16 deletions
@@ -9,14 +9,6 @@ import type {
} from '../../schema'
import { resolveLevelId } from '../../hooks/spatial-grid/spatial-grid-sync'
import type {
AnyNode,
AnyNodeId,
CeilingNode,
SlabNode,
StairNode,
StairSegmentNode,
} from '../../schema'
import { DEFAULT_WALL_HEIGHT } from '../wall/wall-footprint'
type Point2D = [number, number]
@@ -20,7 +20,7 @@ const SPAWN_ICON = (
// eslint-disable-next-line @next/next/no-img-element
<img
alt="Spawn Point"
src="/icons/spawn-point.svg"
src="/icons/site.png"
style={{ width: '100%', height: '100%', objectFit: 'contain' }}
/>
)
@@ -294,7 +294,7 @@ export function StairPanel() {
/>
{(node.slabOpeningMode ?? 'none') === 'destination' ? (
<MetricControl
<SliderControl
label="Opening Offset"
max={0.5}
min={0}
@@ -340,7 +340,7 @@ export function StairPanel() {
{(node.stairType === 'curved' || node.stairType === 'spiral') && (
<PanelSection title="Geometry">
<MetricControl
<SliderControl
label="Width"
max={10}
min={0.4}
@@ -350,7 +350,7 @@ export function StairPanel() {
unit="m"
value={Math.round((node.width ?? 1) * 100) / 100}
/>
<MetricControl
<SliderControl
label="Rise"
max={10}
min={0.2}
@@ -360,7 +360,7 @@ export function StairPanel() {
unit="m"
value={Math.round((node.totalRise ?? 2.5) * 100) / 100}
/>
<MetricControl
<SliderControl
label="Steps"
max={32}
min={2}
@@ -378,7 +378,7 @@ export function StairPanel() {
/>
)}
{(node.stairType === 'spiral' || !(node.fillToFloor ?? true)) && (
<MetricControl
<SliderControl
label="Thickness"
max={1}
min={0.02}
@@ -389,7 +389,7 @@ export function StairPanel() {
value={Math.round((node.thickness ?? 0.25) * 100) / 100}
/>
)}
<MetricControl
<SliderControl
label="Inner Radius"
max={10}
min={node.stairType === 'spiral' ? 0.05 : 0.2}
@@ -417,7 +417,7 @@ export function StairPanel() {
value={node.topLandingMode ?? 'none'}
/>
{(node.topLandingMode ?? 'none') === 'integrated' && (
<MetricControl
<SliderControl
label="Top Landing"
max={5}
min={0.3}