Skip to content

Connect first and last points of a outline using modulo #370

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

Merged
merged 1 commit into from
Mar 25, 2021

Conversation

ahmadayubi
Copy link
Member

Test cases renders as:
newfea

Cause of issue:
Needed to preform modulo when generating outline, without it the first and last coordinate pairs in a coordinates element didn't behave appropriately. Coordinates for a polygon are better thought of as a circular linked list rather than a sequence with a start and an end.

On a side node, the behavior of % operator in JavaScript is not consistent at all, occasionally -1 % 4 = 3 and other times -1 % 4 = -1, there's a work around in this PR for it but it's odd nonetheless.

Closes #368

@prushforth
Copy link
Member

This looks good, sorry for the painful experience! Good work!

@prushforth prushforth merged commit 358ffec into Maps4HTML:master Mar 25, 2021
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.

SVG Rendering behavior changes needed
2 participants