Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

added dialog for showing tour with small window

Beth Timmons95f6958e1961
diff --git a/js/main.js b/js/main.js
index 0a4abf49e..16c1a2fd6 100644
--- a/js/main.js
+++ b/js/main.js
@@ -39,7 +39,7 @@ $(function() {// Initialize "static" vars
selector.render(document.body);
var sel_id = selector.id;
selector.beforeHideEvent.subscribe(function(e){ $("#"+sel_id).css("display","none");})
- selector.beforeHideEvent.subscribe(closeSelector);
+ //selector.beforeHideEvent.subscribe(closeSelector);
selector.beforeShowEvent.subscribe(function(e){$("#"+sel_id).css("display","block");})
//this.selector.subscribe("beforeHide", closeSelector);
// Create map
diff --git a/js/sote.js b/js/sote.js
index b0612fc3f..9167f0ecf 100644
--- a/js/sote.js
+++ b/js/sote.js
@@ -1,10 +1,12 @@
var rb;
function showSelector(e){
+
console.log("show selector");
var selector = e.data.selector;
selector.show();
var myid = "selector_c";
+
// force center
selector.center();
var viewWidth = $(window).width();
@@ -32,6 +34,25 @@ function showSelector(e){
}
}
+/**
+ * Before closing the selector, move the product picker back to its
+ * original place if it's showing.
+ *//*
+function closeSelector(e){
+
+ console.log("close selector");
+ var selector = e.data.selector;
+
+ // force center
+ selector.center();
+ var viewWidth = $(window).width();
+ var selWidth = parseInt(YAHOO.util.Dom.getStyle(myid, 'width'), 10);
+ var newX = (viewWidth - selWidth)/2;
+ YAHOO.util.Dom.setX(myid, newX);
+ console.log("selWidth = " + selWidth);
+ console.log("newX = " + 0);
+}*/
+
function showOverlay(){
if(this.overlay === undefined){
this.overlay = new YAHOO.widget.Panel("panel1", { zIndex:1020, visible:false } );
diff --git a/js/tour.js b/js/tour.js
index 3f96b48e7..82736609a 100644
--- a/js/tour.js
+++ b/js/tour.js
@@ -14,6 +14,9 @@ function startTour(noDisable) {
console.log("VIEWPORT: width = " + viewWidth + ", height = " + viewHeight);
if(devWidth < 500 || viewWidth < 500 || devHeight < 500 || viewHeight < 500) {
+ if(noDisable) {
+ Worldview.notify("Unfortunately the Worldview tour can only be viewed in larger web browser windows.");
+ }
return;
}
@@ -175,6 +178,7 @@ function startTour(noDisable) {
/* conclusion screen after completing the tour */
+ if(!this.conclusionPanel){
var conclusionPanel = new YAHOO.widget.Panel("conclusionPanel", { zIndex:1020,
visible:false,
modal:true,
@@ -195,7 +199,7 @@ function startTour(noDisable) {
"</div>";
conclusionPanel.setBody(conclusionText);
-
+ }
/*
* Restart the tour at the beginning.
*/