What it does
Toolbox is a container for other tools. It shows them as a scrolling row of icons inside one panel.
Toolbars run out of room. A toolbox puts a related group, such as measuring or drawing tools, behind one toolbar entry.
Only one child tool is active at a time.
Using it
Open the toolbox and pick an icon. The selected tool takes over the panel. Pick another icon and the panel switches to that tool.
In your own map
Give the toolbox entry an items list, exactly like a toolbar's, naming the tools it holds.
Nesting is allowed in the config to any depth, but a toolbox flattens it: everything ends up in one row, with no submenus. If you want the hierarchy to survive, use the menu container instead.
Extending it
The DOM a container builds is flat, whatever the config nesting: every sub-tool is a direct child. Inactive children are hidden with hidden and inert so each sub-tool keeps its own layout.
Config type | toolbox |
|---|---|
| Element | <webmapx-toolbox-tool> |
| Placement | toolbar |
| Source | src/components/webmapx-toolbox-tool.ts |
| Tests | tests/tool-registration.test.ts |
| Related | menu, layerOverview, settings |