Interactive interface for browsing global, full-resolution satellite imagery
merge fixes
Ed Plato176ad641dd64
diff --git a/web/js/containers/toolbar.js b/web/js/containers/toolbar.jsindex da1932717..b7c1fd375 100644--- a/web/js/containers/toolbar.js+++ b/web/js/containers/toolbar.js@@ -159,43 +159,37 @@ class toolbarContainer extends Component {: ' wv-status-hide';return (<ErrorBoundary>-<<<<<<< HEAD<ButtonToolbarid="wv-toolbar"- className={'wv-toolbar'}+ className="wv-toolbar">{ !isDistractionFreeModeActive && (- <React.Fragment>+ <><Buttonid="wv-link-button"className="wv-toolbar-button"title="Share this map"- onClick={() =>- openModal(- 'TOOLBAR_SHARE_LINK',- CUSTOM_MODAL_PROPS.TOOLBAR_SHARE_LINK- )- }+ onClick={() => openModal(+ 'TOOLBAR_SHARE_LINK',+ CUSTOM_MODAL_PROPS.TOOLBAR_SHARE_LINK,+ )}>- <FontAwesomeIcon icon={faShareSquare} size='2x' />+ <FontAwesomeIcon icon={faShareSquare} size="2x" /></Button>{config.ui && config.ui.projections ? (<Buttonid="wv-proj-button"className="wv-toolbar-button"title="Switch projection"- onClick={() =>- openModal(- 'TOOLBAR_PROJECTION',- CUSTOM_MODAL_PROPS.TOOLBAR_PROJECTION- )- }+ onClick={() => openModal(+ 'TOOLBAR_PROJECTION',+ CUSTOM_MODAL_PROPS.TOOLBAR_PROJECTION,+ )}>- <FontAwesomeIcon icon={faGlobeAsia} size='2x' />+ <FontAwesomeIcon icon={faGlobeAsia} size="2x" /></Button>- ) : (- ''- )}+ )+ : ''}<Buttonid="wv-image-button"className={@@ -213,69 +207,15 @@ class toolbarContainer extends Component {}onClick={this.openImageDownload}>- <FontAwesomeIcon icon={faCamera} size='2x' />+ <FontAwesomeIcon icon={faCamera} size="2x" /></Button>- </React.Fragment>+ </>)}<Buttonid="wv-info-button"title="Information"className={`wv-toolbar-button${notificationClass} ${isDistractionFreeModeActive ? 'wv-info-button-distraction-free-mode' : ''}`}- onClick={() =>- openModal('TOOLBAR_INFO', CUSTOM_MODAL_PROPS.TOOLBAR_INFO)- }-=======- <ButtonToolbar id="wv-toolbar" className="wv-toolbar">- <Button- id="wv-link-button"- className="wv-toolbar-button"- title="Share this map"- onClick={() => openModal(- 'TOOLBAR_SHARE_LINK',- CUSTOM_MODAL_PROPS.TOOLBAR_SHARE_LINK,- )}- >- <FontAwesomeIcon icon={faShareSquare} size="2x" />- </Button>- {config.ui && config.ui.projections ? (- <Button- id="wv-proj-button"- className="wv-toolbar-button"- title="Switch projection"- onClick={() => openModal(- 'TOOLBAR_PROJECTION',- CUSTOM_MODAL_PROPS.TOOLBAR_PROJECTION,- )}- >- <FontAwesomeIcon icon={faGlobeAsia} size="2x" />- </Button>- )- : ''}- <Button- id="wv-image-button"- className={- isImageDownloadActive- ? 'wv-toolbar-button'- : 'wv-toolbar-button disabled'- }- disabled={!isImageDownloadActive}- title={- isCompareActive- ? 'You must exit comparison mode to use the snapshot feature'- : !isImageDownloadActive- ? 'You must exit data download mode to use the snapshot feature'- : 'Take a snapshot'- }- onClick={this.openImageDownload}- >- <FontAwesomeIcon icon={faCamera} size="2x" />- </Button>- <Button- id="wv-info-button"- title="Information"- className={`wv-toolbar-button${notificationClass}`}onClick={() => openModal('TOOLBAR_INFO', CUSTOM_MODAL_PROPS.TOOLBAR_INFO)}->>>>>>> a94779070df9f8b28d733b972df975bc3cc49edddata-content={notificationContentNumber}><FontAwesomeIcon icon={faInfoCircle} size="2x" />@@ -286,14 +226,10 @@ class toolbarContainer extends Component {}}function mapStateToProps(state) {-<<<<<<< HEAD- const { notifications, palettes, compare, map, layers, proj, data, ui } = state;- const isDistractionFreeModeActive = ui.isDistractionFreeModeActive;-=======const {- notifications, palettes, compare, map, layers, proj, data,+ notifications, palettes, compare, map, layers, proj, data, ui,} = state;->>>>>>> a94779070df9f8b28d733b972df975bc3cc49edd+ const { isDistractionFreeModeActive } = ui;const { number, type } = notifications;const { activeString } = compare;const activeLayersForProj = getLayers(@@ -325,25 +261,16 @@ function mapStateToProps(state) {hasGraticule: Boolean(lodashGet(lodashFind(layers[activeString], { id: 'Graticule' }) || {},-<<<<<<< HEAD- 'visible'- )- ),- isDistractionFreeModeActive- };-}-const mapDispatchToProps = dispatch => ({- toggleDistractionFreeMode: () => {- dispatch(toggleDistractionFreeMode());- },-======='visible',),),+ isDistractionFreeModeActive,};}const mapDispatchToProps = (dispatch) => ({->>>>>>> a94779070df9f8b28d733b972df975bc3cc49edd+ toggleDistractionFreeMode: () => {+ dispatch(toggleDistractionFreeMode());+ },refreshStateAfterImageDownload: (activePalettes, rotation, isGraticule) => {if (activePalettes) {dispatch(refreshPalettes(activePalettes));@@ -416,8 +343,5 @@ toolbarContainer.propTypes = {refreshStateAfterImageDownload: PropTypes.func,requestNotifications: PropTypes.func,rotation: PropTypes.number,-<<<<<<< HEAD- toggleDistractionFreeMode: PropTypes.func-=======->>>>>>> a94779070df9f8b28d733b972df975bc3cc49edd+ toggleDistractionFreeMode: PropTypes.func,};diff --git a/web/js/modules/key-press/actions.js b/web/js/modules/key-press/actions.jsindex 88f88b272..a745e1c50 100644--- a/web/js/modules/key-press/actions.js+++ b/web/js/modules/key-press/actions.js@@ -13,9 +13,11 @@ import { CLOSE as CLOSE_MODAL } from '../modal/constants';*/export function keyPress(keyCode, shiftKey, ctrlOrCmdKey) {return (dispatch, getState) => {- const { modal, animation, tour, ui } = getState();+ const {+ modal, animation, tour, ui,+ } = getState();const modalIsOpen = modal.isOpen;- const isDistractionFreeModeActive = ui.isDistractionFreeModeActive;+ const { isDistractionFreeModeActive } = ui;if (animation.isActive && !modalIsOpen) {// can get more specific modal.key !== "LAYER_PICKER_COMPONENT"dispatch({diff --git a/web/js/modules/tour/reducers.js b/web/js/modules/tour/reducers.jsindex b4c778eda..050a59d94 100644--- a/web/js/modules/tour/reducers.js+++ b/web/js/modules/tour/reducers.js@@ -1,3 +1,4 @@+import { assign as lodashAssign } from 'lodash';import {START, UPDATE_SELECTED, END_TOUR, TOUR_KEY_PRESS_CLOSE,diff --git a/web/js/modules/ui/actions.js b/web/js/modules/ui/actions.jsindex e0ed54ff3..242feb688 100644--- a/web/js/modules/ui/actions.js+++ b/web/js/modules/ui/actions.js@@ -4,11 +4,11 @@ import { CLOSE as CLOSE_MODAL } from '../modal/constants';export function toggleDistractionFreeMode() {return (dispatch, getState) => {const { modal, ui } = getState();- const isDistractionFreeModeActive = ui.isDistractionFreeModeActive;+ const { isDistractionFreeModeActive } = ui;const modalIsOpen = modal.isOpen;dispatch({type: TOGGLE_DISTRACTION_FREE_MODE,- isDistractionFreeModeActive: !isDistractionFreeModeActive+ isDistractionFreeModeActive: !isDistractionFreeModeActive,});if (!isDistractionFreeModeActive && modalIsOpen) {dispatch({ type: CLOSE_MODAL });diff --git a/web/js/modules/ui/reducers.js b/web/js/modules/ui/reducers.jsindex 0315bd003..c1f165f33 100644--- a/web/js/modules/ui/reducers.js+++ b/web/js/modules/ui/reducers.js@@ -1,15 +1,15 @@-import { TOGGLE_DISTRACTION_FREE_MODE } from './constants';import { assign as lodashAssign } from 'lodash';+import { TOGGLE_DISTRACTION_FREE_MODE } from './constants';export const uiState = {- isDistractionFreeModeActive: false+ isDistractionFreeModeActive: false,};export default function uiReducers(state = uiState, action) {switch (action.type) {case TOGGLE_DISTRACTION_FREE_MODE:return lodashAssign({}, state, {- isDistractionFreeModeActive: !state.isDistractionFreeModeActive+ isDistractionFreeModeActive: !state.isDistractionFreeModeActive,});default:return state;