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

fix: make print legend layer order match legend layer order #2059

Merged
merged 2 commits into from
Oct 23, 2024

Conversation

Grammostola
Copy link
Contributor

Aims to fix #2057

Copy link
Contributor

@steff-o steff-o left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like the change to get rid of the async reduce, it is really hard to read.

However this solution introduces an annoying comma sign between the list elements:
image
image

return `<ul id="${this.getId()}" class="list">${content}</ul>`;
const rowPromises = overlayEls.map((item) => item.render());
const rows = await Promise.all(rowPromises);
return `<ul id="${this.getId()}" class="list">${rows.reverse()}</ul>`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implicit rows.reverse().toString() introduces an extra comma as it calls string.join() with comma as separator.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well spotted

@Grammostola Grammostola merged commit a29d845 into master Oct 23, 2024
4 checks passed
@Grammostola Grammostola deleted the fix_print_legend_order branch October 23, 2024 15:04
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

Successfully merging this pull request may close these issues.

Print legend order is reversed
2 participants