Merged
Conversation
mbostock
commented
Jul 9, 2023
Member
Author
mbostock
left a comment
There was a problem hiding this comment.
Other changes that I want to make:
- Allow the sweep option to be specified as a constant number (typically 1, 0, -1) with the same semantics as a function that returns this number. -1 would effectively negate the bend angle.
- Change the default sweep option to 1 instead of null.
- If the sweep option is null, it should either be treated as a number and coerced to 0, or throw an error. (We don’t want to treat null as redundant with undefined for specifying the default value; it means “no” sweep.)
- Remove the order sweep option. (Because I can’t think of a valid use case… but if there is one, please let me know.)
- Allow the sweep option to be specified as a function. (Because why not.)
Member
Author
|
Another thought I had was that we could have the sweep |
Fil
added a commit
that referenced
this pull request
Jul 9, 2023
* arrow sweep option; note that I also removed the arrow head if headLength is zero. * miserables.json * miserables arc diagram * the arrow head and insets computations depend on the flipped bend angle * darker initializer * functional sweep (#1741) * ±[xy] --------- Co-authored-by: Mike Bostock <[email protected]>
Fil
added a commit
that referenced
this pull request
Aug 21, 2023
* arrow sweep option; note that I also removed the arrow head if headLength is zero. * miserables.json * miserables arc diagram * the arrow head and insets computations depend on the flipped bend angle * darker initializer * functional sweep (#1741) * ±[xy] --------- Co-authored-by: Mike Bostock <[email protected]>
chaichontat
pushed a commit
to chaichontat/plot
that referenced
this pull request
Jan 14, 2024
* arrow sweep option; note that I also removed the arrow head if headLength is zero. * miserables.json * miserables arc diagram * the arrow head and insets computations depend on the flipped bend angle * darker initializer * functional sweep (observablehq#1741) * ±[xy] --------- Co-authored-by: Mike Bostock <[email protected]>
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.
I prefer to encapsulate the logic in a function. This also makes it easier for a user to extend with custom logic — even if we don’t chose to expose that extensibility yet.