/** * Import Angular libraries. */ import { AfterViewChecked, OnDestroy, EventEmitter, OnChanges, SimpleChanges, ElementRef } from '@angular/core'; /** * Import third-party libraries. */ import { Image } from '@svgdotjs/svg.js'; /** * Import custom components. */ import { SvgContainerComponent } from '../components/svg-container/svg-container.component'; export declare class SvgImageDirective implements AfterViewChecked, OnDestroy, OnChanges { private _svgContainer; private _elRef; /** * Globally used variables within the directive. */ private _image; /** * Import variables for the image directive. */ imageUrl: string; x: number; y: number; height: number; width: number; classes: string[]; /** * Output variables for the image directive. */ clickEvent: EventEmitter; doubleClickEvent: EventEmitter; mouseOverEvent: EventEmitter; mouseOutEvent: EventEmitter; onInitialize: EventEmitter; /** * Create SVG image directive. * @param _svgContainer - Host SVG Container Component object instance. * @param _elRef - Angular element reference object instance. */ constructor(_svgContainer: SvgContainerComponent, _elRef: ElementRef); /** * Creates the image 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 image object. * @param changes - Angular Simple Changes object containing all of the changes. */ ngOnChanges(changes: SimpleChanges): void; /** * Update image object within the SVG container. * @param reloadImage - Boolean indicator if image should be reloaded. */ private updateImage; /** * Create image object within the SVG container. */ private createImage; /** * Sets correct position for the element. */ private setCorrectPosition; /** * Adds classes to the image object. * @param classesToAdd - List of classes, which needs to be added. * @param classesToRemove - List of classes, which needs to be removed. */ private addRemoveClasses; }