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 Store #12

Open
marySalvi opened this issue May 3, 2022 · 0 comments
Open

Refactor Store #12

marySalvi opened this issue May 3, 2022 · 0 comments

Comments

@marySalvi
Copy link
Collaborator

marySalvi commented May 3, 2022

refactor to use Array.prototype.find instead.

https://github.com/ResonantGeoData/RGD-Vue/blob/51f891a0fba0652ddadedd8ef421765a2a239000/src/store/search.ts#L142-L145

`if (region) {
  drawerContents.value = regionsList.value.filter(
    (entry) => entry.id === spatialId,
  )[0].properties;`

refactor to use delete visibleFootprints.value[key] instead

https://github.com/ResonantGeoData/RGD-Vue/blob/51f891a0fba0652ddadedd8ef421765a2a239000/src/store/cesium/footprints.ts#L32-L37

if (visibleFootprints.value[key]) { visibleFootprints.value = Object.fromEntries( Object.entries(visibleFootprints.value).filter(([k]) => k !== key), ); } };

@marySalvi marySalvi changed the title Refactor Store/search.ts Refactor Store May 3, 2022
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

No branches or pull requests

1 participant