/** * Import Angular libraries. */ import { AfterViewChecked, EventEmitter, OnDestroy, OnChanges, SimpleChanges, ElementRef } from '@angular/core'; /** * Import third-party libraries. */ import { Polygon, PointArrayAlias } from '@svgdotjs/svg.js'; /** * Import custom components. */ import { SvgContainerComponent } from '../components/svg-container/svg-container.component'; export declare class SvgPolygonDirective implements AfterViewChecked, OnChanges, OnDestroy { private _svgContainer; private _elRef; /** * Globally used variables within the directive. */ private _polygon; /** * Import variables for the polygon directive. */ points: PointArrayAlias; borderSize: number; borderColor: string; fill: string; classes: string[]; /** * Output variables for the polygon directive. */ clickEvent: EventEmitter; doubleClickEvent: EventEmitter; mouseOverEvent: EventEmitter; mouseOutEvent: EventEmitter; onInitialize: EventEmitter; /** * Create SVG Polygon directive. * @param _svgContainer - Host SVG Container Component object instance. * @param _elRef - Angular element reference object instance. */ constructor(_svgContainer: SvgContainerComponent, _elRef: ElementRef); /** * Creates or updates the polygon object within the container. */ ngAfterViewChecked(): void; /** * Does all required pre-requisites before destroying the component. */ ngOnDestroy(): void; /** * Is called when changes are made to the polygon object. * @param changes - Angular Simple Changes object containing all of the changes. */ ngOnChanges(changes: SimpleChanges): void; /** * Update polygon object within the SVG container. */ private updatePolygon; /** * Create polygon object within the SVG container. */ private createPolygon; /** * Sets correct position for the element. */ private setCorrectPosition; /** * Adds classes to the polygon object. * @param classesToAdd - List of classes, which needs to be added. * @param classesToRemove - List of classes, which needs to be removed. */ private addRemoveClasses; }