NASA-AMMOS / MMGIS

Multi-Mission Geographical Information System - Web-based Mapping and Spatial Data Infrastructure for Planetary Science Operations - https://nasa-ammos.github.io/MMGIS/
Apache License 2.0
148 stars 46 forks source link

#572 mmgisAPI.getActiveTools #573

Closed tariqksoliman closed 5 months ago

tariqksoliman commented 5 months ago

Closes #572

Adds:

getActiveTools()

This function returns an object with the currently active tool and the name of the active tool in addition to any active separated tools (such as the Identifier and Legend Tools).

The following is an example of how to call the getActiveTools function:

window.mmgisAPI.getActiveTools();
/* returns (example)
{
  activeToolNames: ['InfoTool', 'LegendTool', 'IdentifierTool']
  activeTools: [
    {activeTool: {…}, activeToolName: 'InfoTool'},
    {activeTool: {…}, activeToolName: 'LegendTool'},
    {activeTool: {…}, activeToolName: 'IdentifierTool'}
  ]
}
*/

Also colors the separated Identifier Button to indicate to users that it's active.