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

Greenland map: get the lines to sort correctly, based on "order" attribute. #134

Open
DanielJWood opened this issue Apr 11, 2023 · 1 comment
Assignees

Comments

@DanielJWood
Copy link
Contributor

for some reason, the sort isn't working in.

	    lines = linebox.selectAll(".lines")
	      .data(linesRaw.features.sort((a,b)=> b.properties.order > a.properties.order))
	        .join("path")
	        .attr("class",d => `lines ${d.properties.styleClass} order-${d.properties.order}`);

We walk cold things to be below the others

image

@DanielJWood
Copy link
Contributor Author

Should have been this:

lines = linebox.selectAll(".lines")
	      .data(linesRaw.features.sort((a,b)=> b.properties.order - a.properties.order))
	        .join("path")
	        .attr("class",d => `lines ${d.properties.styleClass} order-${d.properties.order}`);

@alykat alykat self-assigned this Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants