siteBoundaryHandlesEnabled (lib/site-boundary.ts)

editor · packages/editor/src/lib/site-boundary.ts · typescript · MIT
ui, tag:embed-classified

Determines if site boundary handles are enabled based on mode and phase.

// Source: https://github.com/pascalorg/editor | License: MIT | Copyright 2026 Pascal Group Inc
// Provided via justclaw.it.com; keep this notice with the code.
import type { Mode, Phase } from '../store/use-editor'

export const SITE_BOUNDARY_DRAG_LABEL = 'site-boundary'

/**
 * Whether the site's vertex/midpoint handles are grabbable right now.
 *
 * Shared by the 3D boundary editor (`tool-manager.tsx`) and the floorplan's SVG
 * handles (`floorplan-panel.tsx`) because they must agree, and until this existed
 * they did not: each derived the rule from `phase`/`mode` locally, and the sculpt
 * clause was added to only one of them.
 *
 * The disagreement was reachable in exactly one configuration, which is why it was
 * easy to miss: arming sculpt from the 2D view opens 3D beside the plan 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key