if there is only one world, shouldnt show the world selector
This commit is contained in:
@@ -36,6 +36,7 @@ overviewer.views.WorldView = Backbone.View.extend({
|
|||||||
|
|
||||||
overviewer.views.WorldSelectorView = Backbone.View.extend({
|
overviewer.views.WorldSelectorView = Backbone.View.extend({
|
||||||
initialize: function() {
|
initialize: function() {
|
||||||
|
if(overviewer.collections.worldViews.length > 1) {
|
||||||
// a div will have already been created for us, we just
|
// a div will have already been created for us, we just
|
||||||
// need to register it with the google maps control
|
// need to register it with the google maps control
|
||||||
var selectBox = document.createElement('select');
|
var selectBox = document.createElement('select');
|
||||||
@@ -50,6 +51,7 @@ overviewer.views.WorldSelectorView = Backbone.View.extend({
|
|||||||
|
|
||||||
this.el.appendChild(selectBox);
|
this.el.appendChild(selectBox);
|
||||||
overviewer.map.controls[google.maps.ControlPosition.TOP_LEFT].push(this.el);
|
overviewer.map.controls[google.maps.ControlPosition.TOP_LEFT].push(this.el);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
events: {
|
events: {
|
||||||
"change select": "changeWorld"
|
"change select": "changeWorld"
|
||||||
|
|||||||
Reference in New Issue
Block a user