Documentation menu

Interface

DrawingToolCtx

What a JS drawing tool gets in addition to PluginCtx.

extends PluginCtx

Properties

NameTypeDescription
anchors{ time: number; price: number; x: number | null; y: number | null; }[]

Anchors with their position (null where they have none).

styleDrawingStyle
paramsRecord<string, DrawingParam>
hitTolerancenumber

Hit-test distance in CSS px.

Declaration

export interface DrawingToolCtx extends PluginCtx {
    anchors: {
        time: number;
        price: number;
        x: number | null;
        y: number | null;
    }[];
    style: DrawingStyle;
    params: Record<string, DrawingParam>;
    hitTolerance: number;
}

Used by

DrawingToolJs