-
Notifications
You must be signed in to change notification settings - Fork 185
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
clip: geojson #2243
clip: geojson #2243
Conversation
test/output/contourVaporClip.svg
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is lovely!
Co-authored-by: Mike Bostock <[email protected]>
tested in armadillo, by having two marks with these different clip values sharing the same clip-path
Co-authored-by: Mike Bostock <[email protected]>
Co-authored-by: Mike Bostock <[email protected]>
Co-authored-by: Mike Bostock <[email protected]>
I wonder if we should still test for a type string or if doing the 10 tests is fast enough anyway
…avoid duplicating the clip-path
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Co-authored-by: Mike Bostock <[email protected]>
…nto fil/clip-geo
// A path generator for marks that want to draw GeoJSON. | ||
context.path = function () { | ||
return geoPath(this.projection ?? xyProjection(scales)); | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn’t catch this in the review, but I think this should be assigned quite a bit earlier, especially before we pass the context to mark initializers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
follow-up at #2252
Note that one case escapes the memoization: the pointer transform creates a new context, and marks that use it get a second clip path.
closes #1109