Skip to main content

PopoverController

Creates a scrollable popover in a map container.

Hierarchy

Index

Constructors

constructor

  • Parameters

    • options: PopoverOptions

    Returns PopoverController

Properties

_canClose

_canClose: boolean

autoresize

autoresize: boolean

classList

classList: string[]

closable

closable: boolean

containers

containers: { contentView?: HTMLElement; contentWrap?: HTMLElement; contentWrap2?: HTMLElement; main?: HTMLElement; parent: HTMLElement; sizer?: HTMLElement; toolbar?: HTMLElement; view?: HTMLElement }

Type declaration

  • optionalcontentView?: HTMLElement
  • optionalcontentWrap?: HTMLElement
  • optionalcontentWrap2?: HTMLElement
  • optionalmain?: HTMLElement
  • parent: HTMLElement
  • optionalsizer?: HTMLElement
  • optionaltoolbar?: HTMLElement
  • optionalview?: HTMLElement

destroyed

destroyed: boolean

eventOptions

eventOptions: { afterClose: BaseEventHandler<{ controller: BaseController }>; afterLoad: BaseEventHandler<{ controller: BaseController }>; afterRedraw: BaseEventHandler<{ controller: BaseController }>; afterShow: BaseEventHandler<{ controller: BaseController }>; afterUnload: BaseEventHandler<{ controller: BaseController }>; beforeClose: BaseEventHandler<{ controller: BaseController }>; beforeLoad: BaseEventHandler<{ controller: BaseController }>; beforeRedraw: BaseEventHandler<{ controller: BaseController }>; beforeShow: BaseEventHandler<{ controller: BaseController }>; resize: BaseEventHandler<{ controller: BaseController }> } & {}

events

events: Events

fullscreen

fullscreen: { lg: boolean; md: boolean; sm: boolean }

Type declaration

  • lg: boolean
  • md: boolean
  • sm: boolean

id

id: string

loaded

loaded: boolean

map

mapObject

mapObject: Marker | Region

middlewareOptions

middlewareOptions: Middleware[]

middlewares

middlewares: MiddlewareList

mobileCloseBtn

mobileCloseBtn: HTMLElement

name

name: string

opened

opened: boolean

options

options: unknown

optionalparent

point

point: SVGPoint

optionalposition

position?: absolute | relative | fixed

resizeSensor

resizeSensor: ResizeSensor

screenPoint

screenPoint: ScreenPoint

scrollable

scrollable: boolean

state

state: {}

Type declaration

  • [key string]: any

styles

styles: Partial<CSSStyleDeclaration>

template

template: string

templates

templates: { main: HandlebarsTemplateDelegate<any>; toolbar: HandlebarsTemplateDelegate<any> }

Type declaration

  • main: HandlebarsTemplateDelegate<any>
  • toolbar: HandlebarsTemplateDelegate<any>

uid

uid: number

withToolbar

withToolbar: boolean

yShift

yShift: number

Methods

adjustHeight

  • adjustHeight(): void
  • Adjusts height of the container to fit content.


    Returns void

adjustScreenPosition

  • adjustScreenPosition(): void
  • Adjsuts position of the popver.


    Returns void

close

  • close(): void
  • Closes the container


    Returns void

destroy

  • destroy(): void
  • Destroys the controller.


    Returns void

getMainTemplate

  • getMainTemplate(): string
  • This method must be overriden by a child class and to return an HTML code for the main content


    Returns string

getToolbarTemplate

  • getToolbarTemplate(): string
  • This method must be overriden by a child class and return an HTML code for the toolbar.


    Returns string

getWrapperTemplate

  • getWrapperTemplate(): string
  • This method must be overriden by a child class and to return an HTML code for the main content


    Returns string

init

  • init(): void
  • Initialization


    Returns void

is

  • is(name: string): boolean
  • Parameters

    • name: string

    Returns boolean

moveSrceenPositionBy

  • moveSrceenPositionBy(deltaX: number, deltaY: number): void
  • Moves popover by given numbers


    Parameters

    • deltaX: number
    • deltaY: number

    Returns void

open

  • open(): void
  • Returns void

redraw

  • redraw(): void
  • Redraws the container.


    Returns void

render

  • render(): void
  • Renders the content.


    Returns void

resize

  • resize(): void
  • Returns void

setEventHandlers

  • setEventHandlers(): void
  • Sets event handlers


    Returns void

setMainTemplate

  • setMainTemplate(template: any): any
  • Sets the template for the body


    Parameters

    • template: any

    Returns any

setOptions

  • setOptions(options: Record<string, any>): void
  • Parameters

    • options: Record<string, any>

    Returns void

setPoint

  • Sets a point where the popover should be shown


    Parameters

    Returns void

setScreenPosition

  • setScreenPosition(x: number, y: number): void
  • Set popover position by given numbers


    Parameters

    • x: number
    • y: number

    Returns void

setState

  • setState(state?: {}, overwrite?: boolean): void
  • Parameters

    • optionalstate: {}
    • overwrite: boolean = false

    Returns void

setStyles

  • setStyles(styles: Partial<CSSStyleDeclaration>): void
  • Parameters

    • styles: Partial<CSSStyleDeclaration>

    Returns void

updateScroll

  • updateScroll(): void
  • Updates the size of the scrollable container. Automatically fires when window size or content size changes.


    Returns void

updateTopShift

  • updateTopShift(): void
  • Updates top shift of the main container depending on toolbar height


    Returns void

viewDidAppear

  • viewDidAppear(): void
  • Fires when the view appears after being hidden. Should be overriden by a child class.

    @abstract

    Returns void

viewDidDisappear

  • viewDidDisappear(): void
  • This method fires when the view disappears. Should be overriden by a child class.

    @abstract

    Returns void

viewDidLoad

  • viewDidLoad(): void
  • This method fires when the view is fully loaded. Can be used to do any final actions.


    Returns void

viewDidRedraw

  • viewDidRedraw(): void
  • Returns void

viewWillRedraw

  • viewWillRedraw(): void
  • Returns void