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.
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 |
(static) recreateContextUi
Flag to steer whether the #contextUi should be destroyed and re-created
every time the LayerTreeNode is right clicked.
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 |
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 |