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

@@ -123,7 +123,9 @@ OpenLayers.Control.MouseToolbar = OpenLayers.Class(
* evt - {Event}
*/
buttonDown: function(evt) {
if (!OpenLayers.Event.isLeftClick(evt)) return;
if (!OpenLayers.Event.isLeftClick(evt)) {
return;
}
this.buttonClicked = evt.element.action;
OpenLayers.Event.stop(evt);
},
@@ -135,7 +137,9 @@ OpenLayers.Control.MouseToolbar = OpenLayers.Class(
* evt - {Event}
*/
buttonUp: function(evt) {
if (!OpenLayers.Event.isLeftClick(evt)) return;
if (!OpenLayers.Event.isLeftClick(evt)) {
return;
}
if (this.buttonClicked != null) {
if (this.buttonClicked == evt.element.action) {
this.switchModeTo(evt.element.action);
@@ -167,7 +171,9 @@ OpenLayers.Control.MouseToolbar = OpenLayers.Class(
* evt - {Event}
*/
defaultMouseDown: function (evt) {
if (!OpenLayers.Event.isLeftClick(evt)) return;
if (!OpenLayers.Event.isLeftClick(evt)) {
return;
}
this.mouseDragStart = evt.xy.clone();
this.performedDrag = false;
this.startViaKeyboard = false;
@@ -242,7 +248,7 @@ OpenLayers.Control.MouseToolbar = OpenLayers.Class(
this.map.div.style.cursor = "move";
break;
}
document.onselectstart = function() { return false; }
document.onselectstart = function() { return false; };
OpenLayers.Event.stop(evt);
},
@@ -333,11 +339,15 @@ OpenLayers.Control.MouseToolbar = OpenLayers.Class(
* evt - {Event}
*/
defaultMouseUp: function (evt) {
if (!OpenLayers.Event.isLeftClick(evt)) return;
if (!OpenLayers.Event.isLeftClick(evt)) {
return;
}
switch (this.mode) {
case "zoombox":
this.zoomBoxEnd(evt);
if (this.startViaKeyboard) this.leaveMode();
if (this.startViaKeyboard) {
this.leaveMode();
}
break;
case "pan":
if (this.performedDrag) {
@@ -360,7 +370,9 @@ OpenLayers.Control.MouseToolbar = OpenLayers.Class(
&& OpenLayers.Util.mouseLeft(evt, this.map.div)) {
if (this.zoomBox) {
this.removeZoomBox();
if (this.startViaKeyboard) this.leaveMode();
if (this.startViaKeyboard) {
this.leaveMode();
}
}
this.mouseDragStart = null;
this.map.div.style.cursor = "default";