Skip to main content
It shows a sheet with its viewports, and the user can move and add items.

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.
  • setNavigation sets how the wheel and the mouse buttons move the view. See the notes on createModelRenderer.
  • 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: a replace-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: a replace-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 a PaperDocument (see .spec/debt.md, “Paper / drawing layer”).
NavigationSettings
required
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

PaperEditKind
required
string
Document id of the affected viewport/annotation; absent on deselect.
{ x: number; y: number; width: number; height: number; }
The target’s current transform (paper mm) after a move/resize.
Annotation
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.
{ viewportId: string; elementId: string; at: Point2; }
On a room-label move: its viewport, saved room id and new point in plan metres.
{ x: number; y: number; }
On a move of a plan tag: how far it was dragged, in paper mm.
NormalizedTitleblockTemplate
On an edit-titleblock: the detached template candidate the consumer saves.
string
On a title-block select or edit-titleblock: the template element’s id.
string
On a refuse: why the click placed nothing.
SheetMarkRefusalCode
On a refuse of the scale bar or north arrow tool: the code markPlacement gives.
Point2
On an edit-viewport-content: the viewport’s candidate viewCenter, in model metres.

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 authored id, remove one by id, or update its rect, or a field’s fontSize and align.

TableContent

A table’s cells: the header from columns, then rows.

SheetMarkRefusalCode

Why a scale bar or a north arrow cannot go on the sheet.
Last modified on November 30, 2026