/** * Import Angular libraries. */ import { AfterViewInit, EventEmitter, OnChanges, SimpleChanges, ChangeDetectorRef } from '@angular/core'; /** * Import third-party libraries. */ import { Container } from '@svgdotjs/svg.js'; export declare class SvgContainerComponent implements AfterViewInit, OnChanges { private cdRef; /** * Globally used variables within the component. */ pointXCoordinate: number; pointYCoordinate: number; mouseInContainer: boolean; private _svg; private _grid; private _pattern; private _triggerCoordinateChange; private _singleClickHappened; /** * Input variables used within the component. */ containerId: string; height: number; showGrid: boolean; grid: { width: number; height: number; strokeColor: string; }; hoverable: boolean; pointSize: number; viewBox: number[]; /** * Output variables used within the component. */ clickEvent: EventEmitter<{ x: number; y: number; }>; doubleClickEvent: EventEmitter<{ x: number; y: number; }>; mouseOverEvent: EventEmitter; mouseOutEvent: EventEmitter; mouseMoveEvent: EventEmitter<{ x: number; y: number; }>; onInitialize: EventEmitter; /** * Create SVG Container component instance. * @param cdRef - Change Detector Ref object instance. */ constructor(cdRef: ChangeDetectorRef); /** * Does all required pre-requisites when input variables changes. * @param changes - Changes object containing input variable changes for the container. */ ngOnChanges(changes: SimpleChanges): void; /** * Does all required pre-requisites before initializing the component. */ ngAfterViewInit(): void; /** * Retrieves container instance. * @returns SVG Container instance. */ getContainer(): Container; /** * Does all required pre-requisites and adjusts hoverable point position. * @param event - Mouse event handler from the DOM. */ adjustPointPosition(event: MouseEvent): void; /** * Adjust the mouse move position, and sends out to the user. * @param event - Mouse event handler from the DOM. */ adjustMouseMovePosition(event: MouseEvent): void; /** * Does all required pre-requisites when hovered point is clicked. */ onPointClick(): void; /** * Does all required pre-requisites when hovered point is double clicked. */ onPointDoubleClick(): void; /** * Make sure that we don't trigger coordinate change, if we hover point. */ onPointHover(): void; /** * Does all required pre-requisites and updates the viewbox of the svg container. */ private updateViewbox; /** * Sets a container instance. * @param id - ID of the container. */ private setContainer; /** * Does all required pre-requisites and initializes or updates grid pattern. */ private setGridPattern; }