Make it possible to use d3-shape with SvgLine #32
Open
Rich-Harris wants to merge 2 commits intomasterfrom
Open
Make it possible to use d3-shape with SvgLine #32Rich-Harris wants to merge 2 commits intomasterfrom
Rich-Harris wants to merge 2 commits intomasterfrom
Conversation
|
Why not allow custom svg generator to be passed to SvgLine, this will prevent pancake to depend on d3-shape if not needed (it also allows more custom modifiers for the shape). I have added this feature to my modified version of pancake (jdomeij@3064c8d) If then want to use d3-shape you only need to override the default svg generator with customized d3-shape like import { line as d3Line, curveCardinal } from 'd3-shape';
const d3Curve = curveCardinal.tension(0);
const d3LineFunc = d3Line().curve(d3Curve).x(p=>p.x).y(p=>p.y);
|
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.
(and SvgArea?)