diff --git a/package-lock.json b/package-lock.json index 2e978bf..f2fbb82 100755 --- a/package-lock.json +++ b/package-lock.json @@ -6831,15 +6831,13 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true, - "optional": true + "dev": true }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -6856,22 +6854,19 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true, - "optional": true + "dev": true }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true, - "optional": true + "dev": true }, "console-control-strings": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", - "dev": true, - "optional": true + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -7002,8 +6997,7 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -7017,7 +7011,6 @@ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -7034,7 +7027,6 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -7043,15 +7035,13 @@ "version": "0.0.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true, - "optional": true + "dev": true }, "minipass": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.2.4.tgz", "integrity": "sha512-hzXIWWet/BzWhYs2b+u7dRHlruXhwdgvlTMDKC6Cb1U7ps6Ac6yQlR39xsbjWJE377YTCtKwIXIpJ5oP+j5y8g==", "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -7072,7 +7062,6 @@ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -7161,8 +7150,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true, - "optional": true + "dev": true }, "object-assign": { "version": "4.1.1", @@ -7176,7 +7164,6 @@ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -7314,7 +7301,6 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", diff --git a/src/App.js b/src/App.js index 01bea2f..d86719b 100755 --- a/src/App.js +++ b/src/App.js @@ -1,7 +1,7 @@ import 'babel-polyfill'; import React, { Component } from 'react'; import { Container } from 'reactstrap'; -import { HashRouter, Switch, Route } from 'react-router-dom'; +import { Router, Switch, Route } from 'react-router-dom'; import { createStore, applyMiddleware } from 'redux'; import thunk from 'redux-thunk'; import { Provider } from 'react-redux'; @@ -12,6 +12,7 @@ import DataVizViewerContainer from './components/dataviz/DataVizViewerContainer' import initialState from './initialState'; import rootReducer from './reducers'; import DemoNavBar from "./components/nav/DemoNavBar"; +import createHistory from 'history/createBrowserHistory'; /* INITIALIZE REDUX **************************************************************/ const cacheStore = window.sessionStorage.getItem('atlas'); @@ -28,6 +29,8 @@ const saveState = () => { window.sessionStorage.setItem('atlas', JSON.stringify(store.getState())); }; +const history = createHistory(); + store.subscribe(saveState); const GA_TRACKING_ID = 'UA-124331187-6'; @@ -38,15 +41,15 @@ class App extends Component { render() { return ( - + - - + + - + ); } diff --git a/src/components/dataviz/Instruction.js b/src/components/dataviz/Instruction.js index f07ee56..a804787 100644 --- a/src/components/dataviz/Instruction.js +++ b/src/components/dataviz/Instruction.js @@ -68,7 +68,7 @@ class Instruction extends Component { } Instruction.propTypes = { - id: PropTypes.String.isRequired, + id: PropTypes.string.isRequired, title: PropTypes.string.isRequired, children: PropTypes.oneOfType([ PropTypes.arrayOf(PropTypes.node), diff --git a/src/components/nav/DemoNavBar.js b/src/components/nav/DemoNavBar.js index e2b08ed..1f888a4 100644 --- a/src/components/nav/DemoNavBar.js +++ b/src/components/nav/DemoNavBar.js @@ -6,8 +6,8 @@ class DemoNavBar extends Component { render() { return ( - - + + Atlas Concept @@ -15,7 +15,7 @@ class DemoNavBar extends Component { - Cell Types + Cell Types Molecular diff --git a/src/components/schematic/SchematicViewer.js b/src/components/schematic/SchematicViewer.js index 4c88b98..ec3f0cd 100755 --- a/src/components/schematic/SchematicViewer.js +++ b/src/components/schematic/SchematicViewer.js @@ -75,7 +75,7 @@ class SchematicViewer extends Component { {structure.structureName} ) : ( { this.onCellClick(structure.cellName)}} onMouseEnter={() => this.setState({ activeImages: structure.images })} >{structure.structureName} @@ -84,7 +84,7 @@ class SchematicViewer extends Component { {structure.cells.map((cell) => { return - { this.onCellClick(cell.cellName)}} onMouseEnter={() => this.setState( { activeImages: cell.images })} >{cell.cellName}