/** * AnnotationRenderer — overlays annotation visuals on top of sequence cells. * * Performance contract: * - When no annotations exist, `hasAnnotations()` returns false and callers skip all drawing. * - Parsed annotation data is cached by column version; re-parsed only on change. * - The companion row-data column (hidden, name starting with ~) is re-looked up when the * sequence column version changes (so it's found even when created after first render). */ import * as DG from 'datagrok-api/dg'; import { SeqAnnotation, SeqAnnotationHit } from './macromolecule/annotations'; export declare class AnnotationRenderer { private tableCol; private _cache; private _rowCache; private _annotCol; /** Version of tableCol at which _annotCol was last looked up. * Re-lookup when version changes (setting .annotationColumnName tag bumps it). */ private _annotColLookupVersion; constructor(tableCol: DG.Column); /** Fast check — returns false when no annotations exist, so the render loop can skip entirely. */ hasAnnotations(): boolean; /** Returns region annotations (column-level). */ getAnnotations(): SeqAnnotation[]; /** Returns the region name at a given position for a specific row. * Checks per-row region spans first; falls back to column-level only when * the row has no per-row region data at all. */ getRegionNameAtPosition(posIdx: number, rowIdx?: number): string | null; /** Returns liability hits (non-region) for a specific row and position index. */ getHitsAtPosition(rowIdx: number, posIdx: number): SeqAnnotationHit[]; /** Draws annotation background + underline for a single position in a cell. * Called from MonomerPlacer.render() for each visible position. * @param textBottomY If provided, underline is drawn just below this y-coordinate * (use in single-line mode so the underline sticks to the letters). */ drawPositionBackground(g: CanvasRenderingContext2D, x: number, y: number, w: number, h: number, posIdx: number, rowIdx: number, textBottomY?: number): void; /** Builds a tooltip HTML snippet for annotations at a given position+row. */ getTooltipInfo(posIdx: number, rowIdx: number): string[]; /** Finds a per-row region span hit covering the given position, or null. */ private _findRowRegionHit; /** Returns true if the row has any per-row region span data (hits with endPositionIndex set). * When true, column-level region mapping should NOT be used as fallback for this row. */ private _rowHasRegionData; private _ensureCache; private _ensureRowCache; private _getPosList; private _getDefaultRegionColor; } //# sourceMappingURL=cell-renderer-annotations.d.ts.map