NCEAS / metacatui

MetacatUI: A client-side web interface for DataONE data repositories
https://nceas.github.io/metacatui
Apache License 2.0
42 stars 26 forks source link

Layer List Polish: Fix empty legend and layer settings button #2334

Closed yvonnesjy closed 3 months ago

yvonnesjy commented 3 months ago
  1. 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: image After: image

  2. 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. image Before: Click here turns on layer settings AND layer visibility After: Click here only turns on layer settings