import type { EditSpecification, FontData, TransactionState } from "@hylimo/diagram-common"; import type { SModelElementImpl } from "sprotty"; import { ModelIndexImpl, ViewportRootElementImpl } from "sprotty"; import { SCanvasLayoutEngine } from "./canvas/sCanvasLayoutEngine.js"; import type { Matrix } from "transformation-matrix"; import type { Bounds } from "sprotty-protocol"; import type { Bounds as HylimoBounds } from "@hylimo/diagram-common"; import type { CanvasLike } from "./canvas/canvasLike.js"; import { PointVisibilityManager } from "./canvas/pointVisibilityManager.js"; import type { CreateConnectionHoverData } from "../features/create-connection/createConnectionHoverData.js"; /** * Root element. */ export declare class SRoot extends ViewportRootElementImpl implements CanvasLike { /** * Defined font families */ fonts: FontData[]; /** * The bounds of the whole diagram, as defined by hylimo internally, not by sprotty */ rootBounds: HylimoBounds; /** * The revision number increasing with each change. * Required for caching of computed properties */ changeRevision: number; /** * The last sequence number of a received incremental update. */ sequenceNumber: number; /** * The layout engine for the canvases */ private currentLayoutEngine; /** * The version of the layout engine */ private layoutEngineVersion; /** * Internal cached version of the PointVisibilityManager */ private _pointVisibilityManager?; /** * Gets the PointVisibilityManager */ get pointVisibilityManager(): PointVisibilityManager; /** * The edit specification for this element */ edits: EditSpecification; /** * Is this a preview element? */ preview: boolean; /** * The global rotation of the canvas, always 0 for the root element */ globalRotation: number; /** * If defined, can provide information where a potential connection would be created */ createConnectionHoverData?: CreateConnectionHoverData; /** * If this was rendered based on a transaction, the id and sequence number of the transaction */ transactionState?: TransactionState; /** * The amount of time this model has been updated incrementally * Used to disable animation during transactions with many full updates */ incrementalUpdateCount: number; /** * Creates a new SRoot * Initializes the zoom to 0 to prevent rendering before the bound have been set * * @param index the model index */ constructor(index?: ModelIndexImpl); /** * Gets the current layout engine */ get layoutEngine(): SCanvasLayoutEngine; get bounds(): Bounds; /** * Gets all elements which are selected. */ get selectedElements(): SModelElementImpl[]; /** * Gets a transformation matrix which converts from the global coordinate system * to the coordinate system with the scroll and zoom applied. * * @returns the transformation matrix */ getMouseTransformationMatrix(): Matrix; /** * Gets the position of the mouse event in the coordinate system of the canvas. * * @param event the mouse event * @returns the position in the canvas coordinate system */ getPosition(event: MouseEvent): { x: number; y: number; }; } //# sourceMappingURL=sRoot.d.ts.map