LayerPopup(options)

Class LayerPopup

new LayerPopup(options)

Creates an instance of LayerPopup.

Parameters:
Name Type Description
options LayerPopupOption

popup option

Extends

Methods

protected _initDOM()

initialize DOM, render popup

protected _initDOMEvent()

bind DOM events

abstract, protected _initEditorEvent()

bind editor events

protected _initInstance(options)

init instance.
store properties & prepare before initialize DOM

Parameters:
Name Type Description
options LayerPopupOption

layer popup options

destroy()

destroy

Inherited From:

getTitleElement() → {HTMLElement}

get title element

Returns:
HTMLElement -
  • title html element

hide()

hide popup

protected isFitToWindow() → {boolean}

make popup size fit to window

Returns:
boolean -
  • true for fit to window

isShow() → {boolean}

whether this popup is visible

Returns:
boolean -
  • true: shown, false: hidden

off(type, fn)

unbind event handler

Parameters:
Name Type Description
type string

event name and selector

fn function

handler function

Inherited From:

on(aType, aFn)

Parameters:
Name Type Description
aType string | object

event name and selector string

aFn function

event handler

Inherited From:

remove()

remove popup content

Overrides:

setContent($content)

set popup content

Parameters:
Name Type Description
$content jQuery | HTMLElement | string

content

protected setFitToWindow(fit)

make popup size fit to window

Parameters:
Name Type Description
fit boolean

true to make popup fit to window

setTitle(title)

set title

Parameters:
Name Type Description
title string

title text

show()

show popup

protected toggleFitToWindow() → {boolean}

toggle size fit to window

Returns:
boolean -
  • true for fit to window

trigger(…args)

trigger event

Parameters:
Name Type Attributes Description
args object <repeatable>

event name & extra params

Inherited From: