This commit is contained in:
Lachlan Kermode
2019-01-17 18:00:28 +00:00
parent 9d6d51e11d
commit 6226dc3e85
3 changed files with 6 additions and 9 deletions

View File

@@ -35,7 +35,7 @@ class Map extends React.Component {
}
componentWillReceiveProps(nextProps) {
// Set appropriate zoom for narrative
// Set appropriate zoom for narrative
if (hash(nextProps.app.mapBounds) !== hash(this.props.app.mapBounds)
&& nextProps.app.mapBounds !== null) {
this.map.fitBounds(nextProps.app.mapBounds);
@@ -43,13 +43,13 @@ class Map extends React.Component {
if (hash(nextProps.app.selected) !== hash(this.props.app.selected)) {
// Fly to first of events selected
const eventPoint = (nextProps.app.selected.length > 0) ? nextProps.app.selected[0] : null;
if (eventPoint !== null && eventPoint.latitude && eventPoint.longitude) {
this.map.setView([eventPoint.latitude, eventPoint.longitude]);
}
}
}
}
}
}
initializeMap() {
/**

View File

@@ -145,7 +145,7 @@ class SourceOverlay extends React.Component {
<div className="back" onClick={() => this.onShiftGallery(-1)}><svg><path d="M0,-7.847549217020565L6.796176979388489,3.9237746085102825L-6.796176979388489,3.9237746085102825Z"></path></svg></div>
<div className="next" onClick={() => this.onShiftGallery(1)}><svg><path d="M0,-7.847549217020565L6.796176979388489,3.9237746085102825L-6.796176979388489,3.9237746085102825Z"></path></svg></div>
</div>
);
);
}
return (
<div className="media-gallery-controls"></div>
@@ -175,7 +175,7 @@ class SourceOverlay extends React.Component {
</div>
<div className="mo-meta-container">
<div className="mo-box-title">
<p>{`${this.state.idx+1} / ${paths.length}`}</p>
{/* <p>{`${this.state.idx+1} / ${paths.length}`}</p> */}
{title? <p><b>{title}</b></p> : null}
<div>{desc}</div>
</div>