coding style: add braces around test, use {} instead of new Array(), remove unused variable

git-svn-id: http://svn.openlayers.org/trunk/openlayers@10473 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Frédéric Junod
2010-07-09 11:53:36 +00:00
parent 74a6f7e895
commit 4d3a1eebf7
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -134,7 +134,7 @@ OpenLayers.Handler.RegularPolygon = OpenLayers.Class(OpenLayers.Handler.Drag, {
OpenLayers.Handler.prototype.initialize.apply(this, OpenLayers.Handler.prototype.initialize.apply(this,
[control, callbacks, options]); [control, callbacks, options]);
this.options = (options) ? options : new Object(); this.options = (options) ? options : {};
}, },
/** /**
@@ -318,7 +318,7 @@ OpenLayers.Handler.RegularPolygon = OpenLayers.Class(OpenLayers.Handler.Drag, {
* Modify the polygon geometry in place. * Modify the polygon geometry in place.
*/ */
modifyGeometry: function() { modifyGeometry: function() {
var angle, dx, dy, point; var angle, point;
var ring = this.feature.geometry.components[0]; var ring = this.feature.geometry.components[0];
// if the number of sides ever changes, create a new geometry // if the number of sides ever changes, create a new geometry
if(ring.components.length != (this.sides + 1)) { if(ring.components.length != (this.sides + 1)) {
+2 -2
View File
@@ -317,9 +317,9 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, {
positionImage: function() { positionImage: function() {
// if the this layer doesn't exist at the point the image is // if the this layer doesn't exist at the point the image is
// returned, do not attempt to use it for size computation // returned, do not attempt to use it for size computation
if ( this.layer == null ) if (this.layer === null) {
return; return;
}
// position the frame // position the frame
OpenLayers.Util.modifyDOMElement(this.frame, OpenLayers.Util.modifyDOMElement(this.frame,
null, this.position, this.size); null, this.position, this.size);