Interactive interface for browsing global, full-resolution satellite imagery
rotation notification box appears in geo #1780
Benjamin King70f9ddf0b779
diff --git a/web/js/map/ui.js b/web/js/map/ui.jsindex fedfacfff..4835362f0 100644--- a/web/js/map/ui.js+++ b/web/js/map/ui.js@@ -185,13 +185,12 @@ export function mapui(models, config, store, ui) {}self.selected = self.proj[proj.id];var map = self.selected;- store.dispatch({ type: 'MAP/UPDATE_MAP_UI', ui: self });+ let currentRotation = proj.id !== 'geographic' && proj.id !== 'webmerc' ? map.getView().getRotation() : 0;+ store.dispatch({ type: 'MAP/UPDATE_MAP_UI', ui: self, rotation: currentRotation });reloadLayers();// Update the rotation buttons if polar projection to display correct valueif (proj.id !== 'geographic' && proj.id !== 'webmerc') {- let currentRotation = map.getView().getRotation();- store.dispatch({ type: 'MAP/UPDATE_ROTATION', rotation: currentRotation });rotation.setResetButton(currentRotation);}@@ -914,7 +913,7 @@ export function mapui(models, config, store, ui) {}, 200);});const onRenderComplete = () => {- store.dispatch({ type: 'MAP/UPDATE_MAP_UI', ui: self });+ store.dispatch({ type: 'MAP/UPDATE_MAP_UI', ui: self, rotation: self.selected.getView().getRotation() });map.un('rendercomplete', onRenderComplete);};map.on('rendercomplete', onRenderComplete);diff --git a/web/js/modules/map/reducers.js b/web/js/modules/map/reducers.jsindex ae4dad786..9b05d989f 100644--- a/web/js/modules/map/reducers.js+++ b/web/js/modules/map/reducers.js@@ -27,7 +27,10 @@ export default function mapReducer(state = INITIAL_STATE, action) {case UPDATE_MAP_EXTENT:return update(state, { extent: { $set: action.extent } });case UPDATE_MAP_UI:- return update(state, { ui: { $set: action.ui } });+ return lodashAssign({}, state, {+ ui: action.ui,+ rotation: action.rotation+ });case UPDATE_MAP_ROTATION:return update(state, { rotation: { $set: action.rotation } });default: