Skip to content

default geo clip #1132

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

Closed
wants to merge 2 commits into from
Closed

default geo clip #1132

wants to merge 2 commits into from

Conversation

mbostock
Copy link
Member

@mbostock mbostock commented Dec 1, 2022

Fixes #1131.

@mbostock mbostock requested a review from Fil December 1, 2022 02:50
@mbostock
Copy link
Member Author

mbostock commented Dec 1, 2022

Not sure I agree with this change now: it means with the default inset: 0, the default stroked Plot.sphere will get clipped by the frame (as shown in the tests fixed in 1bc1edb).

@mbostock mbostock marked this pull request as draft December 1, 2022 02:59
@Fil Fil added the geo Maps and projections label Dec 1, 2022
@Fil
Copy link
Contributor

Fil commented Dec 1, 2022

Good point.

To state the obvious (as a reminder for future me), since the sphere's strokeWidth defaults to 1.5, it bleeds out of the frame by 0.75px. So, if we clip it to the frame, it is ugly; plus, the apparent strokeWidth is half of what the user expects. However if we don't clip, projections might bleed out of the frame—not a huge problem per se—, but also extend over to neighboring facets, which is much more annoying, and the source of this issue.

I'm playing with:
inset: globalInset = 1,

and it seems ok, event with a pointy projection like geoBerhaus.

Capture d’écran 2022-12-01 à 13 18 16

Mercator is not on the frame any more, but inside it, which is probably OK too (since we wouldn't materialize the frame visually, only as a clipping path):
Capture d’écran 2022-12-01 à 13 19 53

@Fil
Copy link
Contributor

Fil commented Dec 5, 2022

superseded by #1151

@Fil Fil closed this Dec 5, 2022
@Fil Fil mentioned this pull request Jun 29, 2023
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
geo Maps and projections
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plot.geo should default to clip: "frame"?
2 participants