Categorical legend still occupies an small empty space even when the color palette doesn't have colors. The fix returns early instead of inserting an empty svg.
Before:
After:
The toggleVisibility function is expected to return early when the event target is the layer settings button, but I noticed that clicking on the edge of the button still toggles on layer visibility. This was because the current check for early return only checks for the button's children components, not itself.
Before: Click here turns on layer settings AND layer visibility
After: Click here only turns on layer settings
Categorical legend still occupies an small empty space even when the color palette doesn't have colors. The fix returns early instead of inserting an empty svg. Before:
After: ![image](https://github.com/NCEAS/metacatui/assets/8570665/bacef4c1-948e-48b0-8aa1-41bc93c609a2)
The toggleVisibility function is expected to return early when the event target is the layer settings button, but I noticed that clicking on the edge of the button still toggles on layer visibility. This was because the current check for early return only checks for the button's children components, not itself.
Before: Click here turns on layer settings AND layer visibility
After: Click here only turns on layer settings