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

Latest version v5.2.1 breaks new assignment #101

Closed
radames opened this issue Feb 7, 2020 · 5 comments
Closed

Latest version v5.2.1 breaks new assignment #101

radames opened this issue Feb 7, 2020 · 5 comments
Labels
question Further information is requested

Comments

@radames
Copy link

radames commented Feb 7, 2020

Not sure if the news pushes to static from 778acc9 were supposed to cause this error.

But now many d3-delaunay@5 are broken now if the initializaiont is done with new assignments
Was it an expected result? shall we move to

const delaunay = d3.Delaunay.from(particles);

instead of ?

const delaunay = new d3.Delaunay.from(particles);

Broken examples:
https://observablehq.com/@d3/hover-voronoi
https://observablehq.com/@fil/mobility-landscapes

@mourner
Copy link
Collaborator

mourner commented Feb 7, 2020

I think the error is expected — you should only use new in combination with classes (new d3.Delaunay.from is incorrect), while from is a factory function that does instantiation internally.

@mourner mourner added the question Further information is requested label Feb 7, 2020
@Fil
Copy link
Member

Fil commented Feb 7, 2020 via email

@radames
Copy link
Author

radames commented Feb 7, 2020

wonderful! thanks for the response, I've already fix some of my projects using the old new assignment. If I come across other notebooks on observables I'll send comments! Shall I close this issue?

@radames radames closed this as completed Feb 7, 2020
@Fil
Copy link
Member

Fil commented Feb 8, 2020

unfortunately we can't search observable for "new d3.Delaunay.from"

@radames
Copy link
Author

radames commented Feb 8, 2020

unfortunately we can't search observable for "new d3.Delaunay.from"

I've tried the quoted search, unfortunately it doesn't do the full matching search :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
3 participants