diff --git a/lib/OpenLayers/Handler/RegularPolygon.js b/lib/OpenLayers/Handler/RegularPolygon.js index 2db3f30d72..5aec1189cf 100644 --- a/lib/OpenLayers/Handler/RegularPolygon.js +++ b/lib/OpenLayers/Handler/RegularPolygon.js @@ -134,7 +134,7 @@ OpenLayers.Handler.RegularPolygon = OpenLayers.Class(OpenLayers.Handler.Drag, { OpenLayers.Handler.prototype.initialize.apply(this, [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. */ modifyGeometry: function() { - var angle, dx, dy, point; + var angle, point; var ring = this.feature.geometry.components[0]; // if the number of sides ever changes, create a new geometry if(ring.components.length != (this.sides + 1)) { diff --git a/lib/OpenLayers/Tile/Image.js b/lib/OpenLayers/Tile/Image.js index c5750c90de..2c205ce507 100644 --- a/lib/OpenLayers/Tile/Image.js +++ b/lib/OpenLayers/Tile/Image.js @@ -317,9 +317,9 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, { positionImage: function() { // if the this layer doesn't exist at the point the image is // returned, do not attempt to use it for size computation - if ( this.layer == null ) + if (this.layer === null) { return; - + } // position the frame OpenLayers.Util.modifyDOMElement(this.frame, null, this.position, this.size);