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

Addition to #230, added support for array coords #316

Merged
merged 5 commits into from
Mar 28, 2019

Conversation

gpcboekema
Copy link
Contributor

The fix in #245 as fix for #230 is not working for all cases.
This fix also adds a solution when using an array as coords (with z or z and m value).

@gpcboekema gpcboekema marked this pull request as ready for review March 26, 2019 16:06
@calvinmetcalf
Copy link
Member

we probably want to generalize this for any array longer then 2

lib/core.js Outdated
else {
return [transformedArray.x, transformedArray.y];
}
return [transformedArray.x, transformedArray.y].concat(coords.splice(2));
Copy link
Member

Choose a reason for hiding this comment

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

why don't you put this where return [transformedArray.x, transformedArray.y, transformedArray.z]; with the conditional being coords.length > 2 that way the most common case isn't slowed down

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.

None yet

2 participants