PopupDropdownToolbar(options)

new PopupDropdownToolbar(options)

constructor

Parameters:
Name Type Description
options object

popup options

Members

static OPEN_EVENT :ToolbarButton

open event string

Methods

protected _initDOM()

initialize DOM, render popup

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

addItem(item)

add toolbar item

Parameters:
Name Type Description
item ToolbarItem | string | object

toolbar item

getItem(index) → {ToolbarItem}

get toolbar item at given index

Parameters:
Name Type Description
index number

item index

Returns:
ToolbarItem -
  • toolbar item at the index

getItems() → {Array.<ToolbarItem>}

get toolbar items

Returns:
Array.<ToolbarItem> -
  • toolbar items

getToolbar() → {Toolbar}

get toolbar instance it contains

Returns:
Toolbar -
  • toolbar instance

indexOfItem(item) → {number}

get index of given item

Parameters:
Name Type Description
item ToolbarItem

toolbar item

Returns:
number -
  • index of given toolbar item

insertItem(index, item)

insert toolbar item

Parameters:
Name Type Description
index number

index at given item inserted

item ToolbarItem | string | object

toolbar item

removeAllItems()

remove all toolbar items

removeItem(index, destroy) → {ToolbarItem}

remove an item

Parameters:
Name Type Description
index number

item index to remove

destroy boolean

destroy item or not

Returns:
ToolbarItem -
  • removed item

setItems(items)

set toolbar items

Parameters:
Name Type Description
items Array.<ToolbarItem>

toolbar items