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

Replace difference and intersection from turf #633

Merged
merged 1 commit into from Aug 5, 2020

Conversation

Falke-Design
Copy link
Collaborator

Replace difference and intersection from turf with the new lib polygon-clipping. This lib is also used in the alpha version of turf but turf make problems ... so why not use the original source?

Fix: #630

@codeofsumit
Copy link
Contributor

I like replacing turf where possible.
Can you give a bit more info on:

Library size: how's the delta between the components we removed vs what we import now?

Functionality:
Anything we have to be aware of that the new library is missing or edge cases which are unsupported?

@Falke-Design
Copy link
Collaborator Author

Library size:
https://bundlephobia.com/result?p=@turf/difference@6.0.2 8.2kB
https://bundlephobia.com/result?p=@turf/intersect@6.1.3 6.8kB
replaced by
https://bundlephobia.com/result?p=polygon-clipping@0.15.1 7.7kB

Functionality:
Only difference and intersection is replaced what currently only used in Draw.Cut. While testing by my self and with cypress no problems happen and I found no unsupported cases.
Also I tried #555 but this is still a issue.

Also a positiv fact is that the library is up-to-date. The latest realease is 8 days old.
https://github.com/mfogel/polygon-clipping

@codeofsumit codeofsumit merged commit 907c750 into geoman-io:develop Aug 5, 2020
@Falke-Design Falke-Design deleted the replace_turf branch November 11, 2020 20:41
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