mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-11 21:08:36 +03:00
Swap flyto for setView
This commit is contained in:
@@ -40,7 +40,7 @@ class Map extends React.Component {
|
||||
const eventPoint = (nextProps.app.selected.length > 0) ? nextProps.app.selected[0] : null;
|
||||
|
||||
if (eventPoint !== null && eventPoint.latitude && eventPoint.longitude) {
|
||||
this.map.flyTo([eventPoint.latitude, eventPoint.longitude]);
|
||||
this.map.setView([eventPoint.latitude, eventPoint.longitude]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,6 @@ class MapEvents extends React.Component {
|
||||
<g
|
||||
className="location"
|
||||
transform={`translate(${x}, ${y})`}
|
||||
style={{ transition: 'transform 0.1s' }}
|
||||
>
|
||||
{Object.keys(eventsByCategory).map(cat => {
|
||||
return this.renderCategory(eventsByCategory[cat], cat)
|
||||
|
||||
@@ -13,7 +13,6 @@ class MapSelectedEvents extends React.Component {
|
||||
|
||||
renderMarker (event) {
|
||||
const { x, y } = this.projectPoint([event.latitude, event.longitude]);
|
||||
console.log(x, y)
|
||||
return (
|
||||
<g
|
||||
className="location-marker"
|
||||
|
||||
Reference in New Issue
Block a user