Shu Zong Chen avatar Shu Zong Chen committed c79d1df

Changed nav to be an array of stuff

Comments (0)

Files changed (1)

js/eldridge_park.js

 	lowered_z: 5,
 	height: 800,
 	width: 300,
-	_default_navigation: eldridge_park.block_nav,
 	constructor: function(root, opts){
+		var that = this;
 		if (typeof opts == 'undefined'){
 			opts = {};
 		}
 			width: this.width + "px",
 			height: this.height + "px"
 		});
-		if (!this.navigation){
-			if (typeof(this.navigation) == 'undefined'){
-				this.navigation = new this._default_navigation();
-			}
-		}
-		dojo.style(this.navigation.nav, 'z-index', this.nav_z);
-		this.navigation.carousel = this;
-		dojo.place(this.navigation.nav, this.root);
+		dojo.forEach(this.navigation, function(nav){
+			dojo.style(nav.nav, 'z-index', that.nav_z);
+			nav.carousel = that;
+			dojo.place(nav.nav, that.root);
+		});
 		this.curr = null;
 		this.move = null;
 		this.timeout = null;
 					top: "0px",
 					left: "0px"
 				});
-				if (this.navigation){
-					this.navigation.addItem(i, entry);
-				}
+				dojo.forEach(this.navigation, function(nav){
+					nav.addItem(i, entry);
+				});
 			}, this
 		);
 	},
 		}
 	},
 	setTimer: function(i){
+		var that = this;
 		this.curr = i;
 		this.clearTimer();
 		this.jumpTo(this.curr);
-		if (this.navigation){
-			this.navigation.jumpTo(this.curr);
-		}
+		dojo.forEach(this.navigation, function(nav){
+			nav.jumpTo(that.curr);
+		});
 		this.timeout = setTimeout(dojo.hitch(this, "goNext"), this.wait_dur);
 	},
 	goNext: function(){
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.