Interactive interface for browsing global, full-resolution satellite imagery
various rule fixes
Jason Kent8ca4c2ae9649
diff --git a/web/js/debug.js b/web/js/debug.jsindex 5056b2906..28999dd00 100644--- a/web/js/debug.js+++ b/web/js/debug.js@@ -3,7 +3,7 @@ import lodashIsNaN from 'lodash/isNaN';import lodashParseInt from 'lodash/parseInt';import util from './util/util';-export var debug = (function() {+export const debug = (function() {const parameters = util.fromQueryString(location.search);const self = {};@@ -11,7 +11,7 @@ export var debug = (function() {if (parameters.loadDelay) {let delay;try {- delay = parseInt(parameters.loadDelay);+ delay = parseInt(parameters.loadDelay, 10);self.loadDelay(delay);} catch (error) {console.warn(`Invalid load delay: ${delay}`);diff --git a/web/js/location.js b/web/js/location.jsindex 9eda64ca1..8a6d9d8fe 100644--- a/web/js/location.js+++ b/web/js/location.js@@ -93,12 +93,12 @@ export const mapLocationToState = (state, location) => {);// one level deep merge of newState with defaultState- for (const key in stateFromLocation) {+ Object.keys(stateFromLocation).forEach((key) => {const obj = lodashAssign({}, state[key], stateFromLocation[key]);stateFromLocation = update(stateFromLocation, {[key]: { $set: obj },});- }+ });return update(state, { $merge: stateFromLocation });}const startTour = checkTourBuildTimestamp(state.config);diff --git a/web/js/modules/core/actions.js b/web/js/modules/core/actions.jsindex 92a5717d4..25454b940 100644--- a/web/js/modules/core/actions.js+++ b/web/js/modules/core/actions.js@@ -9,32 +9,19 @@ export function requestAction() {// let didTimeOut = false;dispatch(startRequest(actionName, id));- return new Promise((resolve, reject) =>- // const timeout = setTimeout(function() {- // didTimeOut = true;- // dispatch(fetchTimeout(actionName, id));- // }, TIMEOUT_AMOUNT);- fetch(url, { signal })- .then((response) =>- // clearTimeout(timeout);- // if (!didTimeOut) {- (mimeType === 'application/json'- ? response.json()- : response.text()),- // }- )- .then((data) => {- // if (!didTimeOut) {- dispatch(fetchSuccess(actionName, data, id));- resolve(data);- // }- })- .catch((error) => {- // if (didTimeOut) return;- // clearTimeout(timeout);- dispatch(fetchFailure(actionName, error, id));- reject(error);- }));+ return new Promise((resolve, reject) => fetch(url, { signal })+ .then((response) => (mimeType === 'application/json'+ ? response.json()+ : response.text()+ ))+ .then((data) => {+ dispatch(fetchSuccess(actionName, data, id));+ resolve(data);+ })+ .catch((error) => {+ dispatch(fetchFailure(actionName, error, id));+ reject(error);+ }));}export function startRequest(actionName, id) {return {diff --git a/web/js/modules/vector-styles/selectors.js b/web/js/modules/vector-styles/selectors.jsindex 0c488cd1c..136c8feb2 100644--- a/web/js/modules/vector-styles/selectors.js+++ b/web/js/modules/vector-styles/selectors.js@@ -73,7 +73,9 @@ export function findIndex(layerId, type, value, index, groupStr, state) {export function setRange(layerId, props, index, palettes, state) {// Placeholder filter range function- return layerId, props, index, palettes, state;+ return {+ layerId, props, index, palettes, state,+ };}export function setStyleFunction(def, vectorStyleId, vectorStyles, layer, state) {