Resolve MIN-189 "/display general overlays"
2 unresolved threads
Description
This PR introduces basic overlay functionality.
Things done
- render one overlay
- fetch bioEntities for overlay
- fetch configuration (to use default colors later)
- get color value based on linear value from configuration
- display overlay on
view
click
How it works
- fetch bioEntities for overlay
- parse them to object containing upper left corner and bottom left corner coordinates + color value - this allow rendering
- in
useOlMapOverlaysLayer
bioEntities for current selected map are selected - based on coordinates add rectangle in
getOverlayFeatures
function and set their color - add features to layer
- add layer to map
- render
Cases not covered
- Did not cover case where receiving color in different properties from API - coming in next PR
Things not done
- switching overlay off
- rendering multiple overlays
- testing - I did not test hooks, and store function since there will be few quite big changes in next PR - it would be waste of time
Merge request reports
Activity
Filter activity
requested review from @AdrianOrlow, @MateuszBolewski, and @mateusz-winiarczyk
added 1 commit
- cbaaed64 - feat(overlays): implemented overlays initial functionality
- Resolved by Adrian Orłów
10 [{ alpha: 0.8, position: -0.75 }, '#BF4000cc'], 11 [{ alpha: 0.5, position: -0.5 }, '#80800080'], 12 [{ alpha: 0, position: -0.25 }, '#40BF0000'], 13 [{ alpha: 1, position: 0 }, '#00FF00ff'], 14 [{ alpha: 1, position: 0.25 }, '#00BF40ff'], 15 [{ alpha: 1, position: 0.5 }, '#008080ff'], 16 [{ alpha: 1, position: 0.75 }, '#0040BFff'], 17 [{ alpha: 1, position: 1 }, '#0000FFff'], 18 ]; 19 20 it.each(cases)(`and position %s should return %s`, (input, output) => { 21 expect( 22 getHexTricolorGradientColorWithAlpha({ 23 leftColor: RED_HEX, 24 middleColor: GREEN_HEX, 25 rightColor: BLUE_HEX, - Resolved by Adrian Orłów
- Resolved by Adrian Orłów
- todo.txt 0 → 100644
1 - poinformować zespół ze w czw się spóźnię changed this line in version 3 of the diff
LGTM, superb job!
There's a lot of tests lacking but I understand why regarding the description. IMO it's a good idea to add TODOs for tests, we may forget about many of them
Also, please check my comment about "parseOverlayBioEntityToOlRenderingFormat" - it's an RFC if there's no good explanation behind parsing the data in thunk
mentioned in merge request !82 (closed)
added 12 commits
-
15f9bd3f...f51cab97 - 11 commits from branch
development
- b2282dfd - Merge branch 'development' into MIN-189/display-general-overlays
-
15f9bd3f...f51cab97 - 11 commits from branch
enabled an automatic merge when the pipeline for b2282dfd succeeds
mentioned in commit ed9523e9
Please register or sign in to reply