import { ElementRef, QueryList } from '@angular/core'; import Konva from 'konva'; export declare enum EnumKonvaComplexGroups { BUILD = "build", SECTION = "section" } export interface IKonvaComplexLineStyles { primary?: Partial; hover?: Partial; selected?: Partial; disabled?: Partial; } export declare class KonvaService { layer: Konva.Layer; stage: Konva.Stage; container: QueryList; containerSizeWidth: { old: number; current: number; }; constructor(); initContainer(container: QueryList): void; containerSize(): [number, number]; isBuilded(): boolean; createStage(options?: Partial): Konva.Stage; createLayer(options?: Partial): Konva.Layer; calculateCoords(coords: number[], imageWidth: number, containerWidth: number): number[]; /** * * @param coords points for line [x, y,... x,y] * @param opt line style options * @returns Konva Line */ writeLine(coords: number[], opt?: Partial): Konva.Line; addGroup(name: EnumKonvaComplexGroups): Konva.Group; /** * @param option cursor property value; * example:'default'|'pointer', 'not-allowed' * one from list https://www.w3schools.com/jsref/prop_style_cursor.asp */ cursor(option?: string): void; /** * Destroy stage and layer if available */ destroy(): void; }