Back to home page

EIC code displayed by LXR

 
 

    


Warning, /firebird/packages/firebird-core/src/painters/default-painters.ts is written in an unsupported language. File is not indexed.

0001 import {DataModelPainter} from "./data-model-painter";
0002 import {BoxHitPiece} from "../model/box-hit.piece";
0003 import {BoxHitSimplePainter} from "./box-hit-simple.painter";
0004 import {PointTrajectoryPiece} from "../model/point-trajectory.piece";
0005 import {TrajectoryPainter} from "./trajectory.painter";
0006 import {BatchedTrajectoryPainter} from "./batched-trajectory.painter";
0007 
0008 /**
0009  * Registers the built-in painters on a DataModelPainter instance.
0010  *
0011  * Mirror of model/default-piece-init.ts for the painter side: core has no DI,
0012  * so workers and scripts call this explicitly. The Angular application instead
0013  * contributes the same painters through the `PAINTERS` token (`withPainter()`),
0014  * proving built-ins ride the same extension surface users get.
0015  */
0016 export function registerDefaultPainters(painter: DataModelPainter): void {
0017   painter.registerPainter(BoxHitPiece.type, BoxHitSimplePainter);
0018   // Registration order matters: the per-track painter registers first and
0019   // stays the default; the batched one is the selectable alternative
0020   // (painters.byPiece.<name> = trajectory-lines-batched)
0021   painter.registerPainter(PointTrajectoryPiece.type, TrajectoryPainter);
0022   painter.registerPainter(PointTrajectoryPiece.type, BatchedTrajectoryPainter);
0023 }