Skip to content

Commit

Permalink
Update categorized.mjs
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-leech committed Feb 4, 2025
1 parent 222578f commit 4cba4a4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/ui/layers/legends/categorized.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ function catToggle(e, layer, cat) {

filterRemove(layer, cat);

// If the filter is defined in the config for initial display of just a subset of catergories, _style may not yet exist.
cat._style ??= cat.style;

// Set the style to _style that is a stored style.
cat.style = cat._style;

delete cat._style;
Expand Down

0 comments on commit 4cba4a4

Please sign in to comment.