[OpenLayers-Commits] r10990 - in trunk/openlayers/lib/OpenLayers: . Feature Filter

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Sat Jan 1 18:48:08 EST 2011


Author: tschaub
Date: 2011-01-01 15:48:08 -0800 (Sat, 01 Jan 2011)
New Revision: 10990

Modified:
   trunk/openlayers/lib/OpenLayers/Events.js
   trunk/openlayers/lib/OpenLayers/Feature/Vector.js
   trunk/openlayers/lib/OpenLayers/Filter/Comparison.js
   trunk/openlayers/lib/OpenLayers/Filter/Logical.js
Log:
A bit of lint removal.

Modified: trunk/openlayers/lib/OpenLayers/Events.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Events.js	2011-01-01 23:41:47 UTC (rev 10989)
+++ trunk/openlayers/lib/OpenLayers/Events.js	2011-01-01 23:48:08 UTC (rev 10990)
@@ -742,7 +742,7 @@
 
         // fast path
         if(!listeners || listeners.length == 0) {
-            return;
+            return undefined;
         }
 
         // prep evt object with object & div references
@@ -758,7 +758,8 @@
         // execute all callbacks registered for specified type
         // get a clone of the listeners array to
         // allow for splicing during callbacks
-        var listeners = listeners.slice(), continueChain;
+        listeners = listeners.slice();
+        var continueChain;
         for (var i=0, len=listeners.length; i<len; i++) {
             var callback = listeners[i];
             // bind the context to callback.obj

Modified: trunk/openlayers/lib/OpenLayers/Feature/Vector.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Feature/Vector.js	2011-01-01 23:41:47 UTC (rev 10989)
+++ trunk/openlayers/lib/OpenLayers/Feature/Vector.js	2011-01-01 23:48:08 UTC (rev 10990)
@@ -267,7 +267,7 @@
 
         if(!this.layer || !this.geometry.move){
             //do nothing if no layer or immoveable geometry
-            return;
+            return undefined;
         }
 
         var pixel;

Modified: trunk/openlayers/lib/OpenLayers/Filter/Comparison.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Filter/Comparison.js	2011-01-01 23:41:47 UTC (rev 10989)
+++ trunk/openlayers/lib/OpenLayers/Filter/Comparison.js	2011-01-01 23:48:08 UTC (rev 10990)
@@ -109,9 +109,10 @@
         }
         var result = false;
         var got = context[this.property];
+        var exp;
         switch(this.type) {
             case OpenLayers.Filter.Comparison.EQUAL_TO:
-                var exp = this.value;
+                exp = this.value;
                 if(!this.matchCase &&
                    typeof got == "string" && typeof exp == "string") {
                     result = (got.toUpperCase() == exp.toUpperCase());
@@ -120,7 +121,7 @@
                 }
                 break;
             case OpenLayers.Filter.Comparison.NOT_EQUAL_TO:
-                var exp = this.value;
+                exp = this.value;
                 if(!this.matchCase &&
                    typeof got == "string" && typeof exp == "string") {
                     result = (got.toUpperCase() != exp.toUpperCase());

Modified: trunk/openlayers/lib/OpenLayers/Filter/Logical.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Filter/Logical.js	2011-01-01 23:41:47 UTC (rev 10989)
+++ trunk/openlayers/lib/OpenLayers/Filter/Logical.js	2011-01-01 23:48:08 UTC (rev 10990)
@@ -70,9 +70,10 @@
      * {Boolean} The filter applies.
      */
     evaluate: function(context) {
+        var i, len;
         switch(this.type) {
             case OpenLayers.Filter.Logical.AND:
-                for (var i=0, len=this.filters.length; i<len; i++) {
+                for (i=0, len=this.filters.length; i<len; i++) {
                     if (this.filters[i].evaluate(context) == false) {
                         return false;
                     }
@@ -80,7 +81,7 @@
                 return true;
                 
             case OpenLayers.Filter.Logical.OR:
-                for (var i=0, len=this.filters.length; i<len; i++) {
+                for (i=0, len=this.filters.length; i<len; i++) {
                     if (this.filters[i].evaluate(context) == true) {
                         return true;
                     }
@@ -90,6 +91,7 @@
             case OpenLayers.Filter.Logical.NOT:
                 return (!this.filters[0].evaluate(context));
         }
+        return undefined;
     },
     
     /**



More information about the Commits mailing list