Repository navigation
docs(Image): Add a state clip toggle to the sports territories example - #1033
Merged
Merged
Conversation
…example Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
commit: |
Contributor
Preview deploymenthttps://pr-1033-layerchart.techniq.workers.dev Built from c51b8a6. |
…side the map choice Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a toggle to the
Image/sports-territoriesexample for clipping territories to states (on by default, as before): a scissors icon button beside the US / US + Canada choice, styled like the conference focus button (light background while on,aria-pressed, a tooltip saying what clicking does). Both icon buttons are now round (leading-none, so their height follows the icon rather than the line height).Turned off, territories ignore state lines: each team gets its share of the whole map, against every other team, rather than of its own state. The map is merged into one shape with topojson's
merge(states, plus provinces on "US + Canada") and used as the Voronoi'sclip. Both modes go through the same list of clip shapes, so the hover outline and the conference focus work unchanged.geoAlbersUsadraws Alaska and Hawaii as insets beside California, and territories are measured on screen, so a whole-map clip handed Alaska to San Diego State. The insets are still divided on their own; on "US + Canada" (a real projection) Alaska joins the rest.Checked in the browser: 266 D-I football territories either way, D-III's 244 re-dividing in ~170 ms, hover outlines, "US + Canada", and switching back on.
🤖 Generated with Claude Code