Is SkPath
supposed to work with d3's context?
#2734
vhakulinen
started this conversation in
General
Replies: 2 comments
-
I think this is the API that d3 is expecting from the context: https://github.com/microsoft/TypeScript/blob/c043944b1434daa67b66573c66850d51c0a16944/src/lib/dom.generated.d.ts#L5796-L5817 Based on this comment here: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/02205557f6c78879a96b1ea3d9608bcee5d4130d/types/d3-shape/v2/index.d.ts#L13-L17 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Okay, I think I have the answer here: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
d3 can generate SVG paths, or you can pass a context which will receive calls to draw the path.
Most of the time passing
SkPath
to d3 context works fine, but I've encountered situations where it crashes becauseclosePath
is undefined. Not using the context and rendering the returned SVG path works fine.Adding proxy between d3 and
SkPath
that proxiesclosePath
toclose
on theSkPath
seems to fix the issue, but has really poor performance.EDIT: updated the context link to point d3-shape instead of d3-geo
Beta Was this translation helpful? Give feedback.
All reactions