Skip to main content

DrawFunction

Home > @anocca/sequence-viewer-utils > DrawFunction

The draw function, e.g. drawLinear or drawCircular that paints the canvas element

Signature:

export declare type DrawFunction = (props: {
c: CanvasRenderingContext2D;
w: number;
h: number;
ratio: number;
data: RenderData;
sequence: string;
circularSelection: CircularSelection[];
searchResults: {
start: number;
end: number;
active: boolean;
complement: boolean;
}[];
filterChromOptions: string[];
annotationLevels: Annotations[];
renderStateRef: {
clickedFeatures: string[];
hoveringFeature: undefined | string;
};
codons: {
[k: string]: string;
};
isProtein: boolean;
chromatogramData?: ChromatogramData;
}) => {
clickedFeatures: string[];
hoveringFeature: undefined | string;
};

References: RenderData, CircularSelection, Annotations, ChromatogramData