Class: ContextMenu

ContextMenu()

new ContextMenu()

(Abstract) plugin for an Ext.tree.Column used in an layer tree in order to render a custom UI component on right-click of a LayerTreeNode, e. g. a menu (like `Ext.menu.Menu`). The UI creation can be adapted by overwriting the #createContextUi function.
Source:

Members

(static) contextUi

The UI component to be rendered when the LayerTreeNode is right clicked.
Properties:
Name Type Description
contextUi Ext.Component UI component to render
Source:

(static) recreateContextUi

Flag to steer whether the #contextUi should be destroyed and re-created every time the LayerTreeNode is right clicked.
Source:

Methods

(static) createContextUi(layerTreeNode) → {Ext.Component}

Creates and returns the context UI, which is rendered when the LayerTreeNode is right clicked. Should be overwritten by concrete implementation of this plugin.
Parameters:
Name Type Description
layerTreeNode GeoExt.data.model.LayerTreeNode LayerTreeNode holding the OL layer
Source:
Returns:
The UI component to be shown on layer right-click
Type
Ext.Component

(static) showContextUi(clickPos)

Shows the context UI. Can be overwritten by concrete implementation of this plugin. Default shows the #contextUi at the position where the right-click was performed.
Parameters:
Name Type Description
clickPos Array.<number> The pixel position of the right-click
Source: