[Commits] r433 - apps/opengeo/geoexplorer/trunk/lib
commits at geoext.org
commits at geoext.org
Tue Apr 21 21:10:15 CEST 2009
Author: dwins
Date: 2009-04-21 21:10:15 +0200 (Tue, 21 Apr 2009)
New Revision: 433
Modified:
apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js
Log:
A little bit of code cleanup, courtesy of javascript lint.
Modified: apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js
===================================================================
--- apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js 2009-04-21 16:28:07 UTC (rev 432)
+++ apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js 2009-04-21 19:10:15 UTC (rev 433)
@@ -82,7 +82,7 @@
this.capabilities.load({
callback: done
});
- },
+ }
],
// activate app when the above are both done
this.activate
@@ -170,7 +170,7 @@
handler : this.showCapabilitiesGrid,
scope: this
});
- this.on("ready", function() {addLayerButton.enable()});
+ this.on("ready", function() {addLayerButton.enable();});
var removeLayerAction = new Ext.Action({
text: "Remove Layer",
@@ -275,7 +275,7 @@
disabled: true,
items: this.createTools()
});
- this.on("ready", function() {toolbar.enable()});
+ this.on("ready", function() {toolbar.enable();});
var viewport = new Ext.Viewport({
layout: "fit",
@@ -389,7 +389,7 @@
text: "Add Layers",
iconCls: "icon-addlayers",
handler: function(){
- capGridPanel.addLayers()
+ capGridPanel.addLayers();
},
scope : this
}),
@@ -458,7 +458,7 @@
if (scale.length > 0) {
scale = scale.items[0];
- zoomSelector.setValue("1 : " + parseInt(scale.data.scale));
+ zoomSelector.setValue("1 : " + parseInt(scale.data.scale, 10));
} else {
if (!zoomSelector.rendered) return;
zoomSelector.clearValue();
@@ -544,7 +544,7 @@
ready: function() {
var record = this.capabilities.getAt(0);
if(record) {
- infoControl.layerUrls = [record.get("layer").url]
+ infoControl.layerUrls = [record.get("layer").url];
}
},
scope: this
@@ -554,7 +554,7 @@
// create length measure control
var measureLength = this.createMeasureTool(
OpenLayers.Handler.Path, 'Length'
- )
+ );
this.map.addControl(measureLength);
// create area measure control
@@ -719,20 +719,20 @@
measureControl.displaySystem = "english";
- var englishData = metricData.geometry.CLASS_NAME.indexOf("LineString") > -1
- ? measureControl.getBestLength(metricData.geometry)
- : measureControl.getBestArea(metricData.geometry);
+ var englishData = metricData.geometry.CLASS_NAME.indexOf("LineString") > -1 ?
+ measureControl.getBestLength(metricData.geometry) :
+ measureControl.getBestArea(metricData.geometry);
var english = englishData[0];
var englishUnit = englishData[1];
measureControl.displaySystem = "metric";
- var dim = metricData.order == 2
- ? '<sup>2</sup>'
- : '';
+ var dim = metricData.order == 2 ?
+ '<sup>2</sup>' :
+ '';
- return metric.toFixed(2) + " " + metricUnit + dim + "<br>"
- + english.toFixed(2) + " " + englishUnit + dim;
+ return metric.toFixed(2) + " " + metricUnit + dim + "<br>" +
+ english.toFixed(2) + " " + englishUnit + dim;
};
measureControl.events.register("measurepartial", this, function(data) {
@@ -851,7 +851,7 @@
config.map = {
center: [center.lon, center.lat],
zoom: this.map.zoom
- }
+ };
//Layers configuration
config.map.layers = [];
@@ -860,9 +860,9 @@
var c = {
title: layerRecord.get("title"),
- name: (layerRecord.get("layer").params
- && layerRecord.get("layer").params.LAYERS)
- || layerRecord.get("name"),
+ name: (layerRecord.get("layer").params &&
+ layerRecord.get("layer").params.LAYERS) ||
+ layerRecord.get("name"),
visibility: layerRecord.get("layer").getVisibility()
};
More information about the Commits
mailing list