[OpenLayers-Commits] r12192 - in addins/bookmark/trunk: lib/OpenLayers/Control tests/Control

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Tue Jul 26 10:02:06 EDT 2011


Author: hpbrantley
Date: 2011-07-26 07:02:05 -0700 (Tue, 26 Jul 2011)
New Revision: 12192

Modified:
   addins/bookmark/trunk/lib/OpenLayers/Control/Bookmark.js
   addins/bookmark/trunk/tests/Control/Bookmark.html
Log:
Fixed logic error in add().


Modified: addins/bookmark/trunk/lib/OpenLayers/Control/Bookmark.js
===================================================================
--- addins/bookmark/trunk/lib/OpenLayers/Control/Bookmark.js	2011-07-26 09:45:58 UTC (rev 12191)
+++ addins/bookmark/trunk/lib/OpenLayers/Control/Bookmark.js	2011-07-26 14:02:05 UTC (rev 12192)
@@ -169,7 +169,7 @@
      * {Boolean} false if limit reached. true if added successfully.
      */
     add: function(label, bounds, func, param) {
-      if(this.allowDuplicates != false) {
+      if(this.allowDuplicates == false) {
         if(this.find(label) != false) {
             this.remove(label, true);
         }

Modified: addins/bookmark/trunk/tests/Control/Bookmark.html
===================================================================
--- addins/bookmark/trunk/tests/Control/Bookmark.html	2011-07-26 09:45:58 UTC (rev 12191)
+++ addins/bookmark/trunk/tests/Control/Bookmark.html	2011-07-26 14:02:05 UTC (rev 12192)
@@ -79,10 +79,10 @@
         map.addControl(control);
 
         control.add( "BOSTON", new OpenLayers.Bounds(-71.401901,41.989908,-70.698776,42.693033) );
-        found = control.find("BOSTON");
+        var found = control.find("BOSTON");
         t.ok(found.length == 1, "correctly found single bookmark");
 
-        found = "";
+        var found = "";
         control.allowDuplicates = true;
         control.add( "BOSTON", new OpenLayers.Bounds(-71.401901,41.989908,-70.698776,42.693033) );
         control.add( "BOSTON", new OpenLayers.Bounds(-71.401901,41.989908,-70.698776,42.693033) );



More information about the Commits mailing list