mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-12 13:28:36 +03:00
clean handler semantics in Dashboard.jsx (further)
This commit is contained in:
@@ -22,7 +22,6 @@ class CardStack extends React.Component {
|
||||
event={event}
|
||||
language={this.props.language}
|
||||
tools={this.props.tools}
|
||||
// isLoading={this.props.isLoading}
|
||||
getNarrativeLinks={this.props.getNarrativeLinks}
|
||||
getCategoryGroup={this.props.getCategoryGroup}
|
||||
getCategoryColor={this.props.getCategoryColor}
|
||||
|
||||
@@ -94,8 +94,8 @@ class Dashboard extends React.Component {
|
||||
<div>
|
||||
<Viewport
|
||||
methods={{
|
||||
select: this.handleSelect,
|
||||
highlight: this.handleHighlight,
|
||||
onSelect: this.handleSelect,
|
||||
// onHighlight: this.handleHighlight,
|
||||
getCategoryColor: category => this.getCategoryColor(category)
|
||||
}}
|
||||
/>
|
||||
@@ -111,9 +111,11 @@ class Dashboard extends React.Component {
|
||||
getCategoryColor={category => this.getCategoryColor(category)}
|
||||
/>
|
||||
<Timeline
|
||||
onSelect={this.handleSelect}
|
||||
onUpdateTimerange={this.updateTimerange}
|
||||
getCategoryColor={category => this.getCategoryColor(category)}
|
||||
methods={{
|
||||
onSelect: this.handleSelect,
|
||||
onUpdateTimerange: this.updateTimerange,
|
||||
getCategoryColor: category => this.getCategoryColor(category)
|
||||
}}
|
||||
/>
|
||||
<InfoPopUp
|
||||
ui={this.props.ui}
|
||||
|
||||
@@ -19,13 +19,7 @@ class Timeline extends React.Component {
|
||||
dom: this.props.dom
|
||||
}
|
||||
|
||||
const methods = {
|
||||
onSelect: this.props.onSelect,
|
||||
onUpdateTimerange: this.props.onUpdateTimerange,
|
||||
getCategoryColor: this.props.getCategoryColor
|
||||
}
|
||||
|
||||
this.timeline = new TimelineLogic(this.props.app, ui, methods);
|
||||
this.timeline = new TimelineLogic(this.props.app, ui, this.props.methods);
|
||||
this.timeline.update(this.props.domain, this.props.app);
|
||||
this.timeline.render(this.props.domain);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@ export default function(newApp, ui, methods) {
|
||||
}
|
||||
|
||||
const getCategoryColor = methods.getCategoryColor;
|
||||
const select = methods.select;
|
||||
const narrativeProps = ui.narratives;
|
||||
|
||||
// Map Settings
|
||||
@@ -272,7 +271,7 @@ Stop and start the development process in terminal after you have added your tok
|
||||
${lMap.latLngToLayerPoint(d.LatLng).y})`;
|
||||
})
|
||||
.on('click', (location) => {
|
||||
select(location.events);
|
||||
methods.onSelect(location.events);
|
||||
});
|
||||
|
||||
const eventsDom = g.selectAll('.location')
|
||||
|
||||
@@ -119,10 +119,10 @@ const initial = {
|
||||
|
||||
narratives: {
|
||||
default: {
|
||||
style: 'solid', // ['dotted', 'solid']
|
||||
style: 'dotted', // ['dotted', 'solid']
|
||||
opacity: 0.9, // range between 0 and 1
|
||||
stroke: 'red', // Any hex or rgb code
|
||||
strokeWidth: 5
|
||||
strokeWidth: 2
|
||||
},
|
||||
narrative_1: {
|
||||
style: 'solid', // ['dotted', 'solid']
|
||||
|
||||
Reference in New Issue
Block a user