Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

init debug log commit and merge

Edward Plato2aa36cf75118
diff --git a/web/js/app.js b/web/js/app.js
index d514171a9..3711aea59 100644
--- a/web/js/app.js
+++ b/web/js/app.js
@@ -11,6 +11,8 @@ import Toolbar from './containers/toolbar';
// Modal
import Modal from './containers/modal';
+import Test from './containers/test';
+
// Other
import Brand from './brand';
@@ -87,7 +89,7 @@ class App extends React.Component {
<div id="dlMap" />
<div id="timewheels" style={{ display: 'none' }} />
-
+ <Test />
<section
id="timeline"
className="timeline-inner clearfix"
diff --git a/web/js/containers/test.js b/web/js/containers/test.js
new file mode 100644
index 000000000..8a0018b7c
--- /dev/null
+++ b/web/js/containers/test.js
@@ -0,0 +1,25 @@
+import React, { Component } from 'react';
+import PropTypes from 'prop-types';
+import { connect } from 'react-redux';
+
+class Test extends Component {
+ render() {
+ console.log(this.props);
+ return (
+ <div>
+ <div>TEST 123</div>
+ </div>
+ );
+ }
+}
+function mapStateToProps(state) {
+ console.log(state);
+
+ return {
+ };
+}
+
+export default connect(
+ mapStateToProps,
+ null
+)(Test);
diff --git a/web/js/date/timeline.js b/web/js/date/timeline.js
index afc0b8bc1..3be37e661 100644
--- a/web/js/date/timeline.js
+++ b/web/js/date/timeline.js
@@ -519,7 +519,7 @@ export function timeline(models, config, ui) {
);
};
- // arguments passed as date (date object) and selectionStr ('selected' or 'selectedB')
+ // Update date within React component
// FROM LISTENER
var updateReactTimelineDate = function(date, selectionStr) {
let selectedDate = models.date.selected;
diff --git a/web/js/modules/natural-events/util.js b/web/js/modules/natural-events/util.js
index fca1b908c..c10967d10 100644
--- a/web/js/modules/natural-events/util.js
+++ b/web/js/modules/natural-events/util.js
@@ -21,7 +21,9 @@ export function getNaturalEventsParameterSetup(
return loadedModel.active || false;
},
serialize: (currentItemState, currentState) => {
+
const selected = get(currentState, 'legacy.naturalEvents.selected');
+ console.log(currentItemState, currentState, selected)
if (!currentItemState) return false;
return encode(selected);
diff --git a/web/js/redux-location-state-customs.js b/web/js/redux-location-state-customs.js
index e20eb7944..4c37d959b 100644
--- a/web/js/redux-location-state-customs.js
+++ b/web/js/redux-location-state-customs.js
@@ -19,6 +19,7 @@ export function encode(value) {
return encoded;
}
export function createParamsString(qp) {
+ console.log(qp)
const paramArray = Object.keys(qp).reduce((prev, key) => {
const keyString = key.toString();
const valueString = qp[key].toString();
@@ -35,6 +36,7 @@ export function createParamsString(qp) {
}
export function stateToParams(initialState, currentState, location) {
+ console.log(initialState, currentState, location)
const pathConfig = createObjectFromConfig(initialState, location);
if (!pathConfig) {
return { location: { ...location } };