Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Add toolbar and tour to app.js

ZachTRice7ab22c547f0e
diff --git a/web/js/app.js b/web/js/app.js
index 0c0fcb591..fb1a166bd 100644
--- a/web/js/app.js
+++ b/web/js/app.js
@@ -1,4 +1,5 @@
import React from 'react';
+import Toolbar from './components/toolbar/toolbar';
import lodashEach from 'lodash/each';
import googleTagManager from 'googleTagManager';
@@ -95,7 +96,7 @@ import { compareUi } from './compare/ui';
// Other
import { debugConfig, debugLayers } from './debug';
import Brand from './brand';
-import tour from './tour';
+import { tourUi } from './tour/ui';
import { uiInfo } from './ui/info';
// Dependency CSS
@@ -166,15 +167,7 @@ class App extends React.Component {
render() {
return (
<div className="wv-content" data-role="content">
- <ul id="wv-toolbar">
- <li id="wv-link-button" className="wv-toolbar-button" />
- <li id="wv-proj-button" className="wv-toolbar-button" />
- <li id="wv-image-button" className="wv-toolbar-button" />
- <li
- id="wv-info-button"
- className="wv-toolbar-button wv-status-hide"
- />
- </ul>
+ <Toolbar />
<section id="wv-sidebar" />
<div id="layer-modal" className="layer-modal" />
<div id="layer-settings-modal" />
@@ -436,7 +429,7 @@ class App extends React.Component {
elapsed('ui');
// Create widgets
ui.proj = projectionUi(models, config);
- ui.tour = tour(models, ui, config);
+ ui.tour = tourUi(models, ui, config);
ui.sidebar = sidebarUi(models, config, ui);
ui.activeLayers = layersActive(models, ui, config);
ui.addModal = layersModal(models, ui, config);
diff --git a/web/js/components/toolbar/toolbar.js b/web/js/components/toolbar/toolbar.js
index 4eb4a7f8d..85692c96e 100644
--- a/web/js/components/toolbar/toolbar.js
+++ b/web/js/components/toolbar/toolbar.js
@@ -4,7 +4,7 @@ import React from 'react';
// import Snapshot from './snapshot/index.js';
// import Info from './info/index.js'
-class Tour extends React.Component {
+class Toolbar extends React.Component {
constructor(props) {
super(props);
this.state = {
@@ -50,14 +50,14 @@ class Tour extends React.Component {
render() {
return (
- <React.Fragment>
+ <ul id="wv-toolbar" className="wv-toolbar">
<li id="wv-link-button" className="wv-toolbar-button"></li>
<li id="wv-proj-button" className="wv-toolbar-button"></li>
<li id="wv-image-button" className="wv-toolbar-button"></li>
<li id="wv-info-button" className="wv-toolbar-button wv-status-hide"></li>
- </React.Fragment>
+ </ul>
);
}
}
-export default Tour;
\ No newline at end of file
+export default Toolbar;
\ No newline at end of file
diff --git a/web/js/toolbar/ui.js b/web/js/toolbar/ui.js
deleted file mode 100644
index 22af40338..000000000
--- a/web/js/toolbar/ui.js
+++ /dev/null
@@ -1,29 +0,0 @@
-import React from 'react';
-import ReactDOM from 'react-dom';
-import Toolbar from '../components/toolbar/toolbar';
-
-export function toolbarUi(models, ui, config) {
- var self = {};
-
- var init = function() {
- self.reactComponent = ReactDOM.render(
- React.createElement(Toolbar),
- document.getElementById('wv-toolbar')
- );
- };
- init();
- return self;
-}
-// var init = function() {
-// self.show();
-// };
-
-// self.show = function() {
-// var TourWidget = React.createElement(TourStart);
-
-// self.reactComponent = ReactDOM.render(TourWidget, document.getElementById('app'));
-// };
-
-// init();
-// return self;
-// }
diff --git a/web/js/tour/ui.js b/web/js/tour/ui.js
index e542908a4..3047af5df 100644
--- a/web/js/tour/ui.js
+++ b/web/js/tour/ui.js
@@ -18,16 +18,3 @@ export function tourUi(models, ui, config) {
init();
return self;
}
-// var init = function() {
-// self.show();
-// };
-
-// self.show = function() {
-// var TourWidget = React.createElement(TourStart);
-
-// self.reactComponent = ReactDOM.render(TourWidget, document.getElementById('app'));
-// };
-
-// init();
-// return self;
-// }