diff --git a/src/components/Dashboard.jsx b/src/components/Dashboard.jsx index 18a77f6..077e0f2 100644 --- a/src/components/Dashboard.jsx +++ b/src/components/Dashboard.jsx @@ -103,7 +103,6 @@ class Dashboard extends React.Component { }} /> for each location. - * A location consists of an array of events (location.events). The function + * A location consists of an array of events (see selectors). The function * also has full access to the domain and redux state to derive values if - * necessary. The function should return a regular style object. + * necessary. The function should return an array, where the value at the + * first index is a styles object for the SVG at the location, and the value + * at the second index is an optional function that renders additional + * components in the div. */ styleLocation(location) { return [ { fill: 'orange' }, - () => ciao ] } @@ -217,8 +219,8 @@ class Map extends React.Component { return (
-
- {(this.map !== null) ? this.renderSVG() : ''} +
+ {(this.map !== null) ? this.renderTiles() : ''} {(this.map !== null) ? this.renderMarkers() : ''} {(this.map !== null) && isShowingSites ? this.renderSites() : ''} {(this.map !== null) ? this.renderEvents() : ''} diff --git a/src/components/Timeline.jsx b/src/components/Timeline.jsx index 7f9bb2e..4accb68 100644 --- a/src/components/Timeline.jsx +++ b/src/components/Timeline.jsx @@ -211,10 +211,18 @@ class Timeline extends React.Component { this.props.methods.onUpdateTimerange(this.state.timerange); } + /** + * Determines additional styles on the for each location. + * A datetime consists of an array of events (see selectors). The function + * also has full access to the domain and redux state to derive values if + * necessary. The function should return an array, where the value at the + * first index is a styles object for the SVG at the location, and the value + * at the second index is an optional function that renders additional + * components in the div. + */ styleDatetime(timestamp) { return [ { fill: 'orange' }, - () => ciao ] }