@classic-homes/maps-svelte 0.4.3 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -51,8 +51,12 @@
51
51
 
52
52
  function toggleCollapse() {
53
53
  if (collapsible) {
54
+ // Read the shown state before flipping userToggled: isCollapsed switches
55
+ // to localCollapsed the moment userToggled is set, and read after it the
56
+ // stale local value made the first click on a collapsed legend a no-op.
57
+ const next = !isCollapsed;
54
58
  userToggled = true;
55
- localCollapsed = !isCollapsed;
59
+ localCollapsed = next;
56
60
  }
57
61
  }
58
62
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@classic-homes/maps-svelte",
3
- "version": "0.4.3",
3
+ "version": "0.5.1",
4
4
  "description": "Svelte MapLibre components for Classic Theme",
5
5
  "keywords": [
6
6
  "maps",