mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-13 05:48:36 +03:00
fixes to work cleanly with example sheet
This commit is contained in:
@@ -1,8 +1,15 @@
|
||||
import React from 'react'
|
||||
|
||||
function zoomIsActive(duration, extent) {
|
||||
if (duration > 1570000 && extent > 1570000) {
|
||||
return true;
|
||||
}
|
||||
return duration === extent
|
||||
}
|
||||
|
||||
const TimelineZoomControls = ({ extent, zoomLevels, dims, onApplyZoom }) => {
|
||||
function renderZoom (zoom, idx) {
|
||||
const isActive = (zoom.duration === extent)
|
||||
const isActive = zoomIsActive(zoom.duration, extent)
|
||||
return (
|
||||
<text
|
||||
className={`zoom-level-button ${isActive ? 'active' : ''}`}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { mergeDeepLeft } from 'ramda'
|
||||
|
||||
const FA_RED = '#eb443e';
|
||||
|
||||
const initial = {
|
||||
/*
|
||||
* The Domain or 'domain' of this state refers to the tree of data
|
||||
@@ -105,12 +107,12 @@ const initial = {
|
||||
tiles: 'openstreetmap', // ['openstreetmap', 'streets', 'satellite']
|
||||
style: {
|
||||
categories: {
|
||||
default: '#f3de2c'
|
||||
default: FA_RED
|
||||
},
|
||||
narratives: {
|
||||
default: {
|
||||
opacity: 0.9,
|
||||
stroke: 'red',
|
||||
stroke: FA_RED,
|
||||
strokeWidth: 3
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user