Skip to content
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

context.moveTo and context.lineTo implementation #133

Closed
MLouis8 opened this issue Sep 25, 2021 · 1 comment
Closed

context.moveTo and context.lineTo implementation #133

MLouis8 opened this issue Sep 25, 2021 · 1 comment

Comments

@MLouis8
Copy link

MLouis8 commented Sep 25, 2021

Hello,
I'm using canvas.getContext('2d') as a context for displaying a voronoi diagram.
But when I call voronoi.render([context]) the following error comes up :
"TypeError: context.moveTo is not a function"
How can I use d3-delaunay API without creating my own context ?

here is my code:

<script src="https://gist.github.com/MLouis8/390f882dd72d0ee4fb25ddde97b1172b.js"></script>

thanks

@Fil
Copy link
Member

Fil commented Sep 25, 2021

try voronoi.render(context) without brackets (the brackets indicate that the context is optional).

@Fil Fil closed this as completed Sep 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants