UNPKG

@nova-ui/bits

Version:

SolarWinds Nova Framework

49 lines (48 loc) 2.17 kB
import { AfterViewInit, ChangeDetectorRef, ElementRef, NgZone, OnChanges, OnDestroy, SimpleChanges } from "@angular/core"; import { BehaviorSubject } from "rxjs"; import * as i0 from "@angular/core"; export interface IBrokerValue { id: string; targetID: string; targetValue: number; } /** * @ignore * PROTOTYPE for DONUT ZOOMING * * This directive allows to zoom it's element to fit the dimensions of parent element */ export declare class ZoomContentDirective implements OnDestroy, AfterViewInit, OnChanges { private ngZone; private cdRef; private readonly destroy$; zoom: number; scalePadding: string; zoomRatio: number; minZoomDifference: number; maxZoom: number; minZoom: number; useZoom: boolean; margin: number; minScale: number; maxScale: number; scaleIN$: BehaviorSubject<IBrokerValue>; scaleOUT$: BehaviorSubject<IBrokerValue>; private readonly uuid; private element; private parentElement; private elementRect; private parentRect; private latestDataFromBroker; private resizeObserver; constructor(element: ElementRef, ngZone: NgZone, cdRef: ChangeDetectorRef); ngOnChanges(changes: SimpleChanges): void; ngAfterViewInit(): void; ngOnDestroy(): void; onResize(): void; private applyZoom; private applyScale; private checkScaleBoundaries; static ɵfac: i0.ɵɵFactoryDeclaration<ZoomContentDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<ZoomContentDirective, "[nuiZoomContent]", never, { "zoomRatio": { "alias": "zoomRatio"; "required": false; }; "minZoomDifference": { "alias": "minZoomDifference"; "required": false; }; "maxZoom": { "alias": "maxZoom"; "required": false; }; "minZoom": { "alias": "minZoom"; "required": false; }; "useZoom": { "alias": "useZoom"; "required": false; }; "margin": { "alias": "margin"; "required": false; }; "minScale": { "alias": "minScale"; "required": false; }; "maxScale": { "alias": "maxScale"; "required": false; }; "scaleIN$": { "alias": "scaleIN$"; "required": false; }; "scaleOUT$": { "alias": "scaleOUT$"; "required": false; }; }, {}, never, never, false, never>; }