controlled-rising-skyline
Version:
This library provides a rising skyline chart with an horizontal control panel control. This widget is linked to a dynamic history of buildings. An animation displays the rising of the skyline.
126 lines (125 loc) • 3.71 kB
TypeScript
import { AfterViewInit, EventEmitter, OnDestroy, OnInit } from '@angular/core';
import { Building, BuildingSelected, RisingSkylineService } from 'rising-skyline';
import { BehaviorSubject } from 'rxjs';
export declare class ControlledRisingSkylineComponent implements OnInit, AfterViewInit, OnDestroy {
skylineService: RisingSkylineService;
/**
* The width of the container, with its units of mesure (px, %, em...).
* Defaut value is __'600px'__;
*/
width: string;
/**
* The height of the container, with its units of mesure (px, %, em...).
* Defaut value is _'400px'_;
*/
height: string;
/**
* The margin around the container.
* Defaut value is _'10px'_;
*/
margin: string;
/**
/**
* The width of each building on the skyline without the unit of measure.
* Defaut value is __40__;
*/
buildingWidth: number;
/**
* This behaviorSubject emits the complete story of the rising skyline.
*
* This reveived array will be passed to the __SkylineService__.
*/
risingSkylineHistory$: BehaviorSubject<Building[]>;
/**
* Starting speed of the animation in ms.
* Default value is _30_
*/
speed: number;
/**
* __Starting__ color of the color gradation.
* Default value is _ping_
*/
startingColor: string;
/**
* __Ending__ color of the color gradation.
* Default value is _blue_
*/
endingColor: string;
/**
* Always display the vertical title on top of each building.
*
* Default value is **false**.
*/
displayVerticalTitle: boolean;
/**
* Display the vertical title when the building height reaches this value.
*
* Default value is **10**.
*/
buildingMinimumHeightVerticalTitle: number;
/**
* The font to use for the vertical title
*/
font: string;
/**
* Color of the skyline container
*/
skylineBackgroundColor: string;
/**
* Color of the skyline control panel
*/
controlBackgroundColor: string;
/**
* __Slider__ color.
* Default value is _violet_
*/
sliderColor: string;
/**
* (_Internal_) debug mode.
* Default value is **false**
*/
debug: boolean;
/**
* This messenger wil inform the parent container that the user has clicked a building.
*/
onClickBuilding: EventEmitter<BuildingSelected>;
/**
* This messenger will inform the parent container that the user is entering on a building.
*/
onEnterBuilding: EventEmitter<BuildingSelected>;
/**
* This messenger wil inform the parent container that the user is entering on a building.
*/
onLeaveBuilding: EventEmitter<BuildingSelected>;
/**
* The number of floors _(or episodes)_ involved in the skyline, starting from skyline.startDate to skyline.lastDate
*/
numberOfFloors: any;
/**
* The current position of floor _(or episode)_ being drawn.
*/
positionOfFloor: number;
/**
* The subscription on the skyline rising.
*/
private subscriptionSkyline;
constructor(skylineService: RisingSkylineService);
ngOnInit(): void;
/**
* After view initialization : Here, we set the width of the container.
*/
ngAfterViewInit(): void;
/**
* Mouse is entering the building.
*/
mouseEnterBuilding($event: BuildingSelected): void;
/**
* Mouse is leaving the building.
*/
mouseLeaveBuilding($event: BuildingSelected): void;
/**
* Mouse is clicking the building.
*/
mouseClickBuilding($event: BuildingSelected): void;
ngOnDestroy(): void;
}