UNPKG

@c8y/ngx-components

Version:

Angular modules for Cumulocity IoT applications

44 lines 2.32 kB
import { EventEmitter, SimpleChanges } from '@angular/core'; import { CountdownIntervalComponent } from '@c8y/ngx-components'; import { ClusterMapComponent } from './cluster-map.component'; import { ClusterMapConfig, MapStatusButtonsConfig } from './map.model'; import * as i0 from "@angular/core"; export declare class MapStatusComponent { config: ClusterMapConfig; configChange: EventEmitter<ClusterMapConfig>; onUnfollow: EventEmitter<ClusterMapConfig>; clusterMap: ClusterMapComponent; buttonsConfig: Partial<MapStatusButtonsConfig>; centerMapButtonDisabled: boolean; countdownIntervalComp: CountdownIntervalComponent; initConfig: ClusterMapConfig; refreshPaused: boolean; private destroy$; ngOnInit(): void; ngAfterViewInit(): void; ngOnChanges(changes: SimpleChanges): void; center(): void; reload(): void; cancelReload(): void; toggleRealtime(): void; toggleAutoRefresh($event: MouseEvent): void; unfollow(): void; follow(): void; ngOnDestroy(): void; private checkIfMapIsAlreadyCentered; /** * Checks if Center button should be disabled according to provided bounds. * Provided bounds contain coordinates of current map rectangle corners. * Center button should be disabled if distance between center coordinates (from config) and center of current bounds * is less than 1/4 of bounds dimensions. * To achieve it we just need to check if center coordinates (from config) are contained in the boundaries of * current bounds shrunk by 25%. * @param bounds Current map view boundaries. * @returns True if distance between config center and current boundaries center is bigger than 1/4 of boundaries dimensions */ private shouldDisableCenterButton; private defaultButtonsConfig; static ɵfac: i0.ɵɵFactoryDeclaration<MapStatusComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<MapStatusComponent, "c8y-map-status", never, { "config": { "alias": "config"; "required": false; }; "clusterMap": { "alias": "clusterMap"; "required": false; }; "buttonsConfig": { "alias": "buttonsConfig"; "required": false; }; }, { "configChange": "configChange"; "onUnfollow": "onUnfollow"; }, never, never, false, never>; } //# sourceMappingURL=map-status.component.d.ts.map