large scale syntactic clean up adding missing semi-colons and curly braces around blocks.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@5002 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Paul Spencer
2007-10-18 12:27:35 +00:00
parent 954df47c30
commit 3e9beffc99
36 changed files with 154 additions and 98 deletions

View File

@@ -72,7 +72,7 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, {
this.divEvents = null;
this.map.events.unregister("zoomend", this, this.moveZoomBar);
this.map.events.unregister("changebaselayer", this, this.redraw)
this.map.events.unregister("changebaselayer", this, this.redraw);
OpenLayers.Control.PanZoom.prototype.destroy.apply(this, arguments);
},
@@ -155,7 +155,7 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, {
sz = new OpenLayers.Size();
sz.h = this.zoomStopHeight * this.map.getNumZoomLevels();
sz.w = this.zoomStopWidth;
var div = null
var div = null;
if (OpenLayers.Util.alphaHack()) {
var id = "OpenLayers_Control_PanZoomBar" + this.map.id;
@@ -211,7 +211,9 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, {
* and sets the zoom level appropriately.
*/
divClick: function (evt) {
if (!OpenLayers.Event.isLeftClick(evt)) return;
if (!OpenLayers.Event.isLeftClick(evt)) {
return;
}
var y = evt.xy.y;
var top = OpenLayers.Util.pagePosition(evt.object)[1];
var levels = Math.floor((y - top)/this.zoomStopHeight);
@@ -227,7 +229,9 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, {
* evt - {<OpenLayers.Event>}
*/
zoomBarDown:function(evt) {
if (!OpenLayers.Event.isLeftClick(evt)) return;
if (!OpenLayers.Event.isLeftClick(evt)) {
return;
}
this.map.events.register("mousemove", this, this.passEventToSlider);
this.map.events.register("mouseup", this, this.passEventToSlider);
this.mouseDragStart = evt.xy.clone();
@@ -250,7 +254,7 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, {
*/
zoomBarDrag:function(evt) {
if (this.mouseDragStart != null) {
var deltaY = this.mouseDragStart.y - evt.xy.y
var deltaY = this.mouseDragStart.y - evt.xy.y;
var offsets = OpenLayers.Util.pagePosition(this.zoombarDiv);
if ((evt.clientY - offsets[1]) > 0 &&
(evt.clientY - offsets[1]) < parseInt(this.zoombarDiv.style.height) - 2) {
@@ -271,12 +275,14 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, {
* evt - {<OpenLayers.Event>}
*/
zoomBarUp:function(evt) {
if (!OpenLayers.Event.isLeftClick(evt)) return;
if (!OpenLayers.Event.isLeftClick(evt)) {
return;
}
if (this.zoomStart) {
this.div.style.cursor="";
this.map.events.unregister("mouseup", this, this.passEventToSlider);
this.map.events.unregister("mousemove", this, this.passEventToSlider);
var deltaY = this.zoomStart.y - evt.xy.y
var deltaY = this.zoomStart.y - evt.xy.y;
this.map.zoomTo(this.map.zoom + Math.round(deltaY/this.zoomStopHeight));
this.moveZoomBar();
this.mouseDragStart = null;