Code needs some cleaning and optimizations
Opened this issue · 0 comments
olange commented
There are obsolete code fragments inherited from the ObservableHQ notebook (see #1), which shall be removed (for instance, decide for a bounding box algorithm).
Actions
- Does the bounding sphere algorithm really work better than the bounding box of the areas? Check whether we really need all the code of the
bsphereGeom()
getter - The infobox at the bottom of the map should go, it was just there to show state and help development
DONE
06.09.2022 commit 64fbd03- then remove injected
id
property fromthis._projectionDef
(h3-worldmap.js:willUpdate()
), which was introduced by PR #21 — as it served only the display of the infobox; - and restore usage of 100% of available height for the worldmap — currently arbitrarily fixed at
66vh
because of the space used by the infobox (src/views/host.js:hostStyles
)
- then remove injected
- Optimizations: review the geometry builder functions, that return the D3 projections (
_buildPathFn()
,_pathFn()
,src/core/geometries/**
), and determine how they could cache their computations, as long as their sources did not change; probably be they should be defined atwillUpdate()
time — instead of being recalculated anytime they get invoked, as it is now the case - Formatting: run
npm run format
, eventually tweak the ES Linter/Prettier settings (I saw some pedantic end-of-HTML-tag alone on a line, which are not desirable IMO), and version the resultsNOTE
29.04 OL moved this to #22