You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Import the base source code of the web component from our @olange/h3-minimap Observable notebook. Code will need some adaptations, as ObservableHQ is providing some features as part of its runtime:
re-rendering upon asynchronous fetching of external resources (TOPOjson world atlas);
This should really be issue #1, but started its life as a Pull Request. As we cannot convert to an issue, I am creating it new at a late stage — and well, it became issue #19.
Actions
Import and essential adjustments (PR#1)
Bring-in all code from the source Observable @olange/h3-minimap notebook, which displays the geometries DONE 14.04 RF added projection selector and geometries: outlineGeom, hexesGeom, areasGeom, bsphereGeom, land; 27.04 OL removed projection selector
Remove the that argument from the mapViewOrSpinner() template helper DONE 27.04 OL+RF
Remove the _width and _height properties from the mapViewOrSpinner() template helper DONE 27.04 OL+RF
Have the spinner stay as long as the TopoJSON file has not loaded DONE 27.04 OL+RF
Replace the _aspectRatio internal property with the client size of the SVG canvas DONE 28.04 OL replaced with _svgClientRect property
More refactoring (PR#20, PR#27, PR#33)
Externalizes all views, projection and default settings to separate files DONE 28.04 OL
Replace getters with instance methods where applicable — isLoading does not have the semantic of a property; note many such getters were introduced for the geometries, anticipating that they would be calculated when needed and then cached, as they are expensive to create DONE 28.04 OL
Recast public members (getters and instance methods) as private where applicable — they otherwise appear in the documentation DONE 28.04 OL
Refactor the pathFn() and projFn()getters as derived properties, defined only when needed within willUpdate() (depending upon viewBoxSize getter and projection property)
Handle the fetchLandData() promise in firstUpdated() — may by with a Task controller, see reference articles below DONE 16.08.2022 OL PR Land geometry controller #33
World geometry should re-render when either world-geometry-src|coll attributes change DONE 16.08.2022 OL PR Land geometry controller #33
Reference articles
Lit › Controllers › Use cases › Asynchronous tasks[…] long running computations or network I/O, typically have state that changes over time, and will need to notify the host when the task state changes (completes, errors, etc.) […] @lit-labs/task contains a generic Task controller that can pull inputs from the host, execute a task function, and render different templates depending on the task state.
olange
changed the title
Retrofit code from source @olange/h3-minimap Observable notebook
Import and refactor code from source @olange/h3-minimap Observable notebook
Apr 28, 2022
Import the base source code of the web component from our @olange/h3-minimap Observable notebook. Code will need some adaptations, as ObservableHQ is providing some features as part of its runtime:
Note
This should really be issue #1, but started its life as a Pull Request. As we cannot convert to an issue, I am creating it new at a late stage — and well, it became issue #19.
Actions
Import and essential adjustments (PR#1)
DONE
14.04 RF added projection selector and geometries: outlineGeom, hexesGeom, areasGeom, bsphereGeom, land; 27.04 OL removed projection selectorthat
argument from themapViewOrSpinner()
template helperDONE
27.04 OL+RF_width
and_height
properties from themapViewOrSpinner()
template helperDONE
27.04 OL+RFDONE
27.04 OL+RF_aspectRatio
internal property with the client size of the SVG canvasDONE
28.04 OL replaced with_svgClientRect
propertyMore refactoring (PR#20, PR#27, PR#33)
DONE
28.04 OLisLoading
does not have the semantic of a property; note many such getters were introduced for the geometries, anticipating that they would be calculated when needed and then cached, as they are expensive to createDONE
28.04 OLDONE
28.04 OLpathFn()
andprojFn()
getters as derived properties, defined only when needed withinwillUpdate()
(depending uponviewBoxSize
getter andprojection
property)fetchLandData()
promise infirstUpdated()
— may by with aTask
controller, see reference articles belowDONE
16.08.2022 OL PR Land geometry controller #33requestAnimationFrame()
in_measureSVGElement()
as a reactive controller (which would introduce afirstPainted()
lifecycle callback for instance, which would in turn call_measureSVGElement()
and setthis._svgClientRect
)DONE
02.05 OL PR AddsfirstLayout()
lifecycle method and calls_measureSVGElement()
#27world-geometry-src|coll
attributes changeDONE
16.08.2022 OL PR Land geometry controller #33Reference articles
@lit-labs/task
contains a genericTask
controller that can pull inputs from the host, execute a task function, and render different templates depending on the task state.See also
The text was updated successfully, but these errors were encountered: