registerAppComponents function
- ComponentRegistry r
Registers every component type the app's documents carry (spec 12a D8,
S-1): PageComponent, the parametric catalog's types, then
SymbolComponent (spec 09 D1; not a parametric type), the
SeatingComponent (spec 14 S1; not a parametric type either), and the
host's FloorPlanTableData (host embedding API spec E-6) and
FloorPlanTableColor (plan colours spec PC-4). The one
registration New, the sample and Open use — pass it as
DraftDocumentCodec.decode(…, registerComponents: registerAppComponents).
Without the page's registration a file's page loads as preserve-unknown;
without the catalog's, its walls, openings, rooms and dimensions do.
Call it once per registry: PageComponent.register replaces the
page's store unconditionally, so a second call wipes a live page. (The
catalog's registrations skip a type already registered.)
Implementation
void registerAppComponents(ComponentRegistry r) {
PageComponent.register(r);
parametricCatalog.registerComponents(r);
SymbolComponent.register(r);
SeatingComponent.register(r);
FloorPlanTableData.register(r);
FloorPlanTableColor.register(r);
}