Import
Example
Notes
- The renderer needs a browser.
- The renderer shows your document. It does not own it. On an edit event, update your document and call
update(document). - When the panel changes size, call
resize(width, height)in pixels. - Sheet coordinates are in millimetres.
setNavigationsets how the wheel and the mouse buttons move the view. See the notes oncreateModelRenderer.- Call
dispose()when you remove the view.
Signature
Parameters
This function takes no arguments.Returns
createProjectScheduleResolver
The schedule resolver of a project: each schedule’s rows from its building model, read at each call.tagEditCommand
The command that saves a sheet-editor move or Delete of a plan tag on its view: areplace-project-item of the plan view with a new tagPlaces entry for the tag.
roomLabelEditCommand
Save a sheet editor room-label move through the same one-step command as a typed placement.roomLabelPlaceCommand
The command that saves a room label placed by hand on a plan view: areplace-project-item of the view with a new roomLabelPlaces entry for the room, at in plan metres (y is world Z), rounded to whole millimetres; the entry keeps its rotationDeg.
Types
PaperScreenRenderer
An interactive screen view of aPaperDocument (see .spec/debt.md, “Paper / drawing layer”).
How the wheel and mouse buttons pan and zoom this view.
ScheduleProject
The parts of a project a schedule resolver reads. The package does not export this type by name.ResolveSchedule
Turns a saved schedule into the rows the model, or for a schedule of sheets the document, gives now; undefined draws nothing.PaperEditEvent
The target’s current transform (paper mm) after a move/resize.
Detached resize candidate for images, rectangles and circles; also create, edit-text or move.
{
viewportId: string;
elementId: string;
drawn?: {
anchor: {
x: number;
y: number;
};
at: {
x: number;
y: number;
};
auto?: {
anchor: {
x: number;
y: number;
};
at: {
x: number;
y: number;
};
};
};
}
On a move or delete of a plan tag: the viewport it is on and the saved id of its door, window or
wall;
drawn, where its drawing put it: the anchor and text point at of its tag text, and its
paperScale.auto, in model metres. Pass the event to tagEditCommand to save it.On a room-label move: its viewport, saved room id and new point in plan metres.
On an edit-titleblock: the detached template candidate the consumer saves.
PaperEditKind
Candidate events never mutate the sheet; consumers apply them through project history.PaperToolId
SheetMarkTool
The marks that tie to a viewport: a scale bar and a north arrow.SheetMarkPlacement
Whether a scale bar or a north arrow can go on a sheet.TitleblockElementEdit
One title-block element edit: insert an element with an authoredid, remove one by id, or update its rect, or a field’s fontSize and align.
TableContent
A table’s cells: the header fromcolumns, then rows.