import Class from '../core/Class'; import Size from '../geo/Size'; import Geometry from '../geometry/Geometry'; import Coordinate from '../geo/Coordinate'; import type { Map } from './../map/Map'; import { Point } from '../geo'; declare const UIComponent_base: { new (...args: any[]): { _eventMap?: Record; _eventParent?: any; _eventTarget?: any; on(eventsOn: string | import("../core/Eventable").EventRecords, handler: import("../core/Eventable").HandlerFn, context?: any): any; addEventListener(...args: any[]): any; once(eventTypes: string | import("../core/Eventable").EventRecords, handler: import("../core/Eventable").HandlerFn, context?: any): any; off(eventsOff: string | import("../core/Eventable").EventRecords, handler: import("../core/Eventable").HandlerFn, context?: any): any; removeEventListener(...args: any[]): any; listens(eventType: string, handler?: import("../core/Eventable").HandlerFn, context?: any): number; getListeningEvents(): string[]; copyEventListeners(target: any): any; fire(eventType: string, param?: import("../core/Eventable").BaseEventParamsType): any; _wrapOnceHandler(evtType: string, handler: import("../core/Eventable").HandlerFn, context?: any): (...args: any[]) => void; _switch(to: string, eventRecords: import("../core/Eventable").EventRecords, context?: any): any; _clearListeners(eventType: string): void; _clearAllListeners(): void; _setEventParent(parent: any): any; _setEventTarget(target: any): any; _fire(eventType: string, param: import("../core/Eventable").BaseEventParamsType): any; }; } & typeof Class; /** * @classdesc * Base class for all the UI component classes, a UI component is a HTMLElement positioned with geographic coordinate.
* It is abstract and not intended to be instantiated. * * @category ui * @abstract * @mixes Eventable * @memberOf ui * @extends Class */ declare class UIComponent extends UIComponent_base { options: UIComponentOptionsType; /** * Some instance methods subclasses needs to implement:
*
* 1. Optional, returns the Dom element's position offset
* function getOffset : Point
*
* 2. Method to create UI's Dom element
* function buildOn : HTMLElement
*
* 3 Optional, to provide an event map to register event listeners.
* function getEvents : void
* 4 Optional, a callback when dom is removed.
* function onDomRemove : void
* 5 Optional, a callback when UI Component is removed.
* function onRemove : void
* @param {Object} options configuration options */ constructor(options: UIComponentOptionsType); onAdd(): void; onRemove(): void; onDomRemove(): void; getEvents(): { [key: string]: () => void; }; getOwnerEvents(): { [key: string]: () => void; }; buildOn(): HTMLElement; /** * Adds the UI Component to a geometry or a map * @param {Geometry|Map} owner - geometry or map to addto. * @returns {ui.UIComponent} this * @fires ui.UIComponent#add */ addTo(owner: Geometry | Map): this; /** * Get the map it added to * @return {Map} map instance * @override */ getMap(): Map; /** * Show the UI Component, if it is a global single one, it will close previous one. * @param {Coordinate} [coordinate=null] - coordinate to show, default is owner's center * @return {ui.UIComponent} this * @fires ui.UIComponent#showstart * @fires ui.UIComponent#showend */ show(coordinate: Coordinate): this; /** * Hide the UI Component. * @return {ui.UIComponent} this * @fires ui.UIComponent#hide */ hide(): this; /** * Decide whether the ui component is open * @returns {Boolean} true|false */ isVisible(): boolean; /** * Remove the UI Component * @return {ui.UIComponent} this * @fires ui.UIComponent#hide * @fires ui.UIComponent#remove */ remove(): this; /** * Get pixel size of the UI Component. * @return {Size} size */ getSize(): Size; getOwner(): Map | Geometry; /** * get Dom Node * @returns {HTMLDivElement} dom|null */ getDOM(): HTMLElement; /** * set Dom Node zIndex * */ setZIndex(zIndex: number): this; getPosition(): Point; onGeometryPositionChange(param: any): void; onMoving(): void; onEvent(): void; onZoomEnd(): void; onResize(): void; onDomSizeChange(): void; isSupportZoomFilter(): boolean; onConfig(config: Record): this; static isSupport(owner: Geometry | Map): boolean; } export default UIComponent; export type UIComponentOptionsType = { eventsPropagation?: boolean; eventsToStop?: string; dx?: number; dy?: number; autoPan?: boolean; autoPanDuration?: number; single?: boolean; animation?: string; animationOnHide?: boolean; animationDuration?: number; pitchWithMap?: boolean; rotateWithMap?: boolean; visible?: boolean; roundPoint?: boolean; collision?: boolean; collisionBufferSize?: number; collisionWeight?: number; collisionFadeIn?: boolean; zIndex?: number; cssName?: string | Array; enableScrollbar?: boolean; }; export type UIComponentAlignOptionsType = { horizontalAlignment?: 'middle' | 'left' | 'right'; verticalAlignment?: 'middle' | 'top' | 'bottom'; }; //# sourceMappingURL=UIComponent.d.ts.map