tgve / tgvejs

Turing Geo-Visualisation Engine
MIT License
31 stars 7 forks source link

Explose two callbacks in TGVE: onViewStateChange and onStateChange #164

Closed layik closed 2 years ago

layik commented 2 years ago

This is the first of API callbacks. Both are important for better integration of TGVE to applications and are overdue.

codecov-commenter commented 2 years ago

Codecov Report

Merging #164 (10fbea8) into develop (89bf78e) will decrease coverage by 0.16%. The diff coverage is 75.00%.

@@             Coverage Diff             @@
##           develop     #164      +/-   ##
===========================================
- Coverage    46.86%   46.70%   -0.17%     
===========================================
  Files           44       44              
  Lines         2375     2394      +19     
  Branches       978      989      +11     
===========================================
+ Hits          1113     1118       +5     
- Misses        1093     1102       +9     
- Partials       169      174       +5     
Flag Coverage Δ
unittests 46.70% <75.00%> (-0.17%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/components/decksidebar/DeckSidebar.jsx 53.09% <ø> (ø)
src/utils/utils.js 51.44% <33.33%> (-2.32%) :arrow_down:
src/home/index.js 48.00% <71.42%> (+1.65%) :arrow_up:
src/components/settings/LayerSettings.jsx 52.83% <100.00%> (ø)
src/utils/api.js 86.88% <100.00%> (+1.17%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 89bf78e...10fbea8. Read the comment docs.

layik commented 2 years ago

The tests for these changes have been focused on an "OSM buildings viewer" using osmbuildings api to pull building boundaries as GeoJSON and vis them in TGVE. The throttling applied to the "update URL" might need to change but will have to wait until issues are raised.

layik commented 2 years ago

onStateChange is almost a reverse of what current select API does and can be seen in this PR.

layik commented 2 years ago