mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-12 13:28:36 +03:00
foldable timeline
This commit is contained in:
@@ -20,6 +20,7 @@ import Categories from "./Categories";
|
||||
class Timeline extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
let searchParams = new URLSearchParams(window.location.href.split("?")[1]);
|
||||
this.styleDatetime = this.styleDatetime.bind(this);
|
||||
this.getDatetimeX = this.getDatetimeX.bind(this);
|
||||
this.getY = this.getY.bind(this);
|
||||
@@ -27,7 +28,7 @@ class Timeline extends React.Component {
|
||||
this.onSelect = this.onSelect.bind(this);
|
||||
this.svgRef = React.createRef();
|
||||
this.state = {
|
||||
isFolded: false,
|
||||
isFolded: (searchParams.has('timeline') && searchParams.get('timeline') === 'false'),
|
||||
dims: props.dimensions,
|
||||
scaleX: null,
|
||||
scaleY: null,
|
||||
|
||||
Reference in New Issue
Block a user