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

fix: index and ordering for layer groups (DHIS2-8496) #69

Merged
merged 1 commit into from
Mar 19, 2020

Conversation

turban
Copy link
Collaborator

@turban turban commented Mar 19, 2020

Fixes: https://jira.dhis2.org/browse/DHIS2-8496

The tracked entities layer uses "layer group" as it contains both points, lines and polygons. The layer group didn't have the setIndex method, only the individual layers.

Error shown in the console:
Screenshot 2020-03-19 at 13 30 33

The method is called from the maps app:
https://github.com/dhis2/maps-app/blob/master/src/components/map/Layer.js#L123

This PR adds the setIndex method, and calls the same method on each sublayer.

There are no code changes in Layer.js (only prettifier).

The PR also includes a fix for the removeFrom(map) method.

Tracked entities shown above a thematic map:

Screenshot 2020-03-19 at 12 30 44

Tracked entities shown below a thematic map:

Screenshot 2020-03-19 at 12 30 56

@turban turban requested a review from martinkrulltott March 19, 2020 11:33
Copy link
Member

@amcgee amcgee left a comment

Choose a reason for hiding this comment

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

Code looks good to me!

@martinkrulltott martinkrulltott changed the title fix: index and ordering for layer groups fix: index and ordering for layer groups (DHIS2-8496) Mar 19, 2020
Copy link

@martinkrulltott martinkrulltott left a comment

Choose a reason for hiding this comment

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

LGTM

@turban turban merged commit 00bc7d0 into master Mar 19, 2020
@turban turban deleted the fix/DHIS2-8496 branch March 19, 2020 12:35
dhis2-bot added a commit that referenced this pull request Mar 19, 2020
## [1.0.14](v1.0.13...v1.0.14) (2020-03-19)

### Bug Fixes

* index and ordering for layer groups ([#69](#69)) ([00bc7d0](00bc7d0))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 1.0.14 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

4 participants