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

refactor: unify source handling #354

Closed
d-koppenhagen opened this issue May 22, 2024 · 0 comments
Closed

refactor: unify source handling #354

d-koppenhagen opened this issue May 22, 2024 · 0 comments

Comments

@d-koppenhagen
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
Currently each Source component has some common code which will create the corresponding OpenLayers source, watch for any changes, applies / removes the source. The code therefore is mostly duplicated in each component but sometimes a bit different.

Describe the solution you'd like
To simplify component setup (as well for possible plugin providers), the base code should be extracted in a separate composable.
Also the usage of computed / shallowRef for the created sources should be unified.
A shallowRef should be good enough and it prevents the re-creation of the source instance on side effects which could lead into performance issues or issues with not cleaned up sold sources.

Describe alternatives you've considered
none.

Additional context
This will possibly introduce a breaking change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant