Skip to content

Commit

Permalink
Merge pull request #121 from UrbanInstitute/patch-map-improvements
Browse files Browse the repository at this point in the history
Patch map improvements
  • Loading branch information
mitchthorson authored Dec 20, 2024
2 parents e4067f6 + 92cc961 commit 7c0e065
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/storybook-tests.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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 <p> tags to avoid CSS conflicts between <Theme /> and component styles
Expand Down
2 changes: 2 additions & 0 deletions src/lib/maps/ColorLegend/ColorLegend.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@
: scale.quantiles
? scale.quantiles() // scaleQuantile
: scale.domain(); // scaleThreshold
} else {
thresholds = undefined;
}
$: tickFormatFn = getTickFormatFn(tickFormat, thresholds);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/maps/SVGPolygonLayer/SVGPolygonLayer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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)}
></path>
{/each}
</g>
Expand Down

0 comments on commit 7c0e065

Please sign in to comment.