Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch map improvements #121

Merged
merged 4 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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