Documentation
Code
GitLab
@geogirafe/lib-geoportal
components/map/tools/contextmenu
ContextMenu
Class ContextMenu
Show a simple context menu when clicking on the map
Index
Constructors
constructor
Accessors
enabled
visible
Methods
_handle
Click
Event
_handle
Contextmenu
Event
close
Menu
disable
enable
on
Click
Entry
open
Menu
update
Menu
Entries
Constructors
constructor
new
ContextMenu
(
mapComponent
:
MapComponent
,
menuEntries
?:
MenuEntry
[]
,
mouseTrigger
?:
(
evt
:
MouseEvent
)
=>
boolean
,
openCondition
?:
(
evt
:
MouseEvent
,
mapCoordinate
:
Coordinate
)
=>
boolean
,
)
:
ContextMenu
Parameters
mapComponent
:
MapComponent
menuEntries
:
MenuEntry
[]
= []
mouseTrigger
:
(
evt
:
MouseEvent
)
=>
boolean
= alternateMouseClick
openCondition
:
(
evt
:
MouseEvent
,
mapCoordinate
:
Coordinate
)
=>
boolean
= ...
Returns
ContextMenu
Accessors
enabled
get
enabled
()
:
boolean
Returns
boolean
visible
get
visible
()
:
boolean
Returns
boolean
Methods
_handle
Click
Event
_handleClickEvent
()
:
void
Returns
void
_handle
Contextmenu
Event
_handleContextmenuEvent
(
evt
:
MouseEvent
,
mouseTrigger
:
(
evt
:
MouseEvent
)
=>
boolean
,
openCondition
:
(
evt
:
MouseEvent
,
mapCoordinate
:
Coordinate
)
=>
boolean
,
)
:
void
Parameters
evt
:
MouseEvent
mouseTrigger
:
(
evt
:
MouseEvent
)
=>
boolean
openCondition
:
(
evt
:
MouseEvent
,
mapCoordinate
:
Coordinate
)
=>
boolean
Returns
void
close
Menu
closeMenu
()
:
void
Returns
void
disable
disable
()
:
void
Returns
void
enable
enable
()
:
void
Returns
void
on
Click
Entry
onClickEntry
(
evt
:
MouseEvent
,
callback
:
(
e
:
MouseEvent
,
mapCoordinate
:
Coordinate
)
=>
void
,
)
:
void
Parameters
evt
:
MouseEvent
callback
:
(
e
:
MouseEvent
,
mapCoordinate
:
Coordinate
)
=>
void
Returns
void
open
Menu
openMenu
(
mapCoordinates
:
Coordinate
)
:
void
Parameters
mapCoordinates
:
Coordinate
Returns
void
update
Menu
Entries
updateMenuEntries
(
menuEntries
:
MenuEntry
[]
)
:
void
Parameters
menuEntries
:
MenuEntry
[]
Returns
void
Settings
Member Visibility
Protected
Inherited
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Accessors
enabled
visible
Methods
_handle
Click
Event
_handle
Contextmenu
Event
close
Menu
disable
enable
on
Click
Entry
open
Menu
update
Menu
Entries
@geogirafe/lib-geoportal
Loading...