From 4d3a1eebf7af35ba0279d27f981ae2686a6e0217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Junod?= Date: Fri, 9 Jul 2010 11:53:36 +0000 Subject: [PATCH] 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 --- lib/OpenLayers/Handler/RegularPolygon.js | 4 ++-- lib/OpenLayers/Tile/Image.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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);