export default PixiTrack; export type PixiTrackOptions = { /** * - If the label is to be drawn, where should it be drawn? */ labelPosition: string; /** * - What should be drawn in the label. * If either labelPosition or labelText are false, no label will be drawn. */ labelText: string; trackBorderWidth?: number | undefined; trackBorderColor?: string | undefined; backgroundColor?: string | undefined; labelColor?: string | undefined; lineStrokeColor?: string | undefined; barFillColor?: string | undefined; name?: string | undefined; labelTextOpacity?: number | undefined; labelBackgroundColor?: string | undefined; labelLeftMargin?: number | undefined; labelRightMargin?: number | undefined; labelTopMargin?: number | undefined; labelBottomMargin?: number | undefined; labelBackgroundOpacity?: number | undefined; labelShowAssembly?: boolean | undefined; labelShowResolution?: boolean | undefined; dataTransform?: string | undefined; }; export type PixiTrackContext = import("./Track").ExtendedTrackContext<{ scene: import("pixi.js").Container; }>; export type ExtendedPixiContext = T & PixiTrackContext; export type ExtendedPixiOptions = T & PixiTrackOptions; /** * @typedef PixiTrackOptions * @property {string} labelPosition - If the label is to be drawn, where should it be drawn? * @property {string} labelText - What should be drawn in the label. * If either labelPosition or labelText are false, no label will be drawn. * @property {number=} trackBorderWidth * @property {string=} trackBorderColor * @property {string=} backgroundColor * @property {string=} labelColor * @property {string=} lineStrokeColor * @property {string=} barFillColor * @property {string=} name * @property {number=} labelTextOpacity * @property {string=} labelBackgroundColor * @property {number=} labelLeftMargin * @property {number=} labelRightMargin * @property {number=} labelTopMargin * @property {number=} labelBottomMargin * @property {number=} labelBackgroundOpacity * @property {boolean=} labelShowAssembly * @property {boolean=} labelShowResolution * @property {string=} dataTransform */ /** * @typedef {import('./Track').ExtendedTrackContext<{ scene: import('pixi.js').Container}>} PixiTrackContext */ /** * @template T * @typedef {T & PixiTrackContext} ExtendedPixiContext */ /** * @template T * @typedef {T & PixiTrackOptions} ExtendedPixiOptions */ /** * @template {ExtendedPixiOptions<{[key: string]: any}>} Options * @extends {Track} */ declare class PixiTrack> extends Track { /** * @param {PixiTrackContext} context - Includes the PIXI.js scene to draw to. * @param {Options} options - The options for this track. */ constructor(context: PixiTrackContext, options: Options); /** @type {import('pixi.js').Container} */ scene: import("pixi.js").Container; /** @type {boolean} */ delayDrawing: boolean; /** @type {import('pixi.js').Graphics} */ pBase: import("pixi.js").Graphics; /** @type {import('pixi.js').Graphics} */ pMasked: import("pixi.js").Graphics; /** @type {import('pixi.js').Graphics} */ pMask: import("pixi.js").Graphics; /** @type {import('pixi.js').Graphics} */ pMain: import("pixi.js").Graphics; /** @type {import('pixi.js').Graphics} */ pBorder: import("pixi.js").Graphics; /** @type {import('pixi.js').Graphics} */ pBackground: import("pixi.js").Graphics; /** @type {import('pixi.js').Graphics} */ pForeground: import("pixi.js").Graphics; /** @type {import('pixi.js').Graphics} */ pLabel: import("pixi.js").Graphics; /** @type {import('pixi.js').Graphics} */ pMobile: import("pixi.js").Graphics; /** @type {import('pixi.js').Graphics} */ pAxis: import("pixi.js").Graphics; /** @type {import('pixi.js').Graphics} */ pMouseOver: import("pixi.js").Graphics; /** @type {string} */ prevOptions: string; /** @type {string} */ labelTextFontFamily: string; /** @type {number} */ labelTextFontSize: number; /** * Used to avoid label/colormap clashes * @type {number} */ labelXOffset: number; /** @type {import('pixi.js').Text} */ labelText: import("pixi.js").Text; /** @type {import('pixi.js').Text} */ errorText: import("pixi.js").Text; /** @type {boolean} */ flipText: boolean; /** @type {import('./types').TilesetInfo | undefined} */ tilesetInfo: import("./types").TilesetInfo | undefined; /** @type {{ [key: string]: string }} */ errorTexts: { [key: string]: string; }; setLabelText(): void; /** * @param {[number, number]} position * @param {[number, number]} dimensions */ setMask(position: [number, number], dimensions: [number, number]): void; setForeground(): void; /** * Draw a border around each track. */ drawBorder(): void; /** Set an error for this track. * * The error can be associated with a source so that multiple * components within the track can set their own independent errors * that will be displayed to the user without overlapping. * * @param {string} error The error text * @param {string} source The source of the error */ setError(error: string, source: string): void; drawError(): void; drawBackground(): void; /** * Determine the label color based on the number of options. * * @return {string} The color to use for the label. */ getLabelColor(): string; getName(): string; drawLabel(): void; /** * Export an SVG representation of this track * * @returns {[HTMLElement, HTMLElement]} The two returned DOM nodes are both SVG * elements [base, track]. Base is a parent which contains track as a * child. Track is clipped with a clipping rectangle contained in base. * */ exportSVG(): [HTMLElement, HTMLElement]; /** * @returns {number} */ calculateZoomLevel(): number; } import Track from './Track';