diff --git a/.github/workflows/storybook-tests.yml b/.github/workflows/storybook-tests.yml index d776c6e..4d7bd4a 100644 --- a/.github/workflows/storybook-tests.yml +++ b/.github/workflows/storybook-tests.yml @@ -1,14 +1,14 @@ -name: 'Storybook Tests' +name: "Storybook Tests" on: push jobs: test: timeout-minutes: 60 - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: '20.x' + node-version: "20.x" - name: Install dependencies run: npm ci - name: Run Vitest tests diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d33993..5b8954d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # @UrbanInstitute/dataviz-components Changelog ## Next +- Fix: Color scale resets ticks when switching from threshold scale to continuous scale +- Patch: SVGPolygonLayer uses mousedown instead of click event ## v0.12.1 - Fix: Add more specificity to several

tags to avoid CSS conflicts between and component styles diff --git a/src/lib/maps/ColorLegend/ColorLegend.svelte b/src/lib/maps/ColorLegend/ColorLegend.svelte index 8fa4af8..79c04b5 100644 --- a/src/lib/maps/ColorLegend/ColorLegend.svelte +++ b/src/lib/maps/ColorLegend/ColorLegend.svelte @@ -190,6 +190,8 @@ : scale.quantiles ? scale.quantiles() // scaleQuantile : scale.domain(); // scaleThreshold + } else { + thresholds = undefined; } $: tickFormatFn = getTickFormatFn(tickFormat, thresholds); diff --git a/src/lib/maps/SVGPolygonLayer/SVGPolygonLayer.svelte b/src/lib/maps/SVGPolygonLayer/SVGPolygonLayer.svelte index d089bc2..8c37409 100644 --- a/src/lib/maps/SVGPolygonLayer/SVGPolygonLayer.svelte +++ b/src/lib/maps/SVGPolygonLayer/SVGPolygonLayer.svelte @@ -163,7 +163,7 @@ stroke-width={strokeWidth / $transform.k} d={geoPathFn(feature)} on:mousemove={(e) => handleMousemove(e, feature)} - on:click={(e) => handleClick(e, feature)} + on:mousedown={(e) => handleClick(e, feature)} > {/each}