Import
Signature
Parameters
BuildingModel
required
ViewFrame
required
DrawingSourceRef | undefined
required
ViewDrag
required
{
kind: 'along-host-wall';
}
required
BuildResult
required
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Change a drag on an opening in a drawing into an edit command.
import { resolveViewEditCandidate, ViewEditCandidateError } from '@opengeometry/floorkit';
function resolveViewEditCandidate(
model: BuildingModel,
frame: ViewFrame,
sourceRef: DrawingSourceRef | undefined,
drag: ViewDrag,
constraint: {
kind: 'along-host-wall';
},
built: BuildResult,
): BuildingEditCommand;
BuildingEditCommand;
class ViewEditCandidateError extends Error {
readonly code: ViewEditCandidateErrorCode;
constructor(code: ViewEditCandidateErrorCode, message: string);
}
interface ViewDrag {
x: number;
y: number;
}
type ViewEditCandidateErrorCode =
| 'invalid-constraint'
| 'invalid-source'
| 'inspect-only'
| 'stale-source'
| 'unhosted-opening'
| 'invalid-drag'
| 'invalid-build'
| 'invalid-view-frame'
| 'foreshortened-axis'
| 'off-axis-drag'
| 'ambiguous-wall-edge';