[OpenLayers-Commits] r12178 -
addins/bookmark/trunk/lib/OpenLayers/Control
commits-20090109 at openlayers.org
commits-20090109 at openlayers.org
Thu Jul 21 09:56:06 EDT 2011
Author: hpbrantley
Date: 2011-07-21 06:56:05 -0700 (Thu, 21 Jul 2011)
New Revision: 12178
Modified:
addins/bookmark/trunk/lib/OpenLayers/Control/Bookmark.js
Log:
Minor cleanup; comments added.
Modified: addins/bookmark/trunk/lib/OpenLayers/Control/Bookmark.js
===================================================================
--- addins/bookmark/trunk/lib/OpenLayers/Control/Bookmark.js 2011-07-21 12:54:44 UTC (rev 12177)
+++ addins/bookmark/trunk/lib/OpenLayers/Control/Bookmark.js 2011-07-21 13:56:05 UTC (rev 12178)
@@ -51,7 +51,7 @@
/**
* APIProperty: allowDuplicates
- * {Boolean} Allow the bookmarks to be duplicated. If not, overwrite
+ * {Boolean} Allow the bookmark names to be duplicated. If not, overwrite
* existing.
* Default to false.
*/
@@ -298,7 +298,7 @@
}
this.stack[i].func(this.stack[i].param);
found=true;
- break; // break out of for when found
+ break; // break out when found
}
}
this.reindex();
@@ -317,7 +317,7 @@
* {Boolean} False if not found
*/
zoomTo: function(label) {
- OpenLayers.Console.log("zoomTo() deprecated. Use zoomToLabel");
+ OpenLayers.Console.log("zoomTo() deprecated. Use zoomToLabel(label)");
return this.zoomToLabel(label);
},
@@ -334,7 +334,7 @@
zoomToLabel: function(label) {
f = this.find(label);
if(f != false) {
- OpenLayers.Console.log("found label " + f[0][1]);
+ OpenLayers.Console.log(f[0][1] + " found");
this.zoomToId(f[0][0]);
return true;
}
@@ -366,7 +366,7 @@
* Method: sortByLabel
* Sort stack by label values. Called by sort().
*/
- sortByLabel: function(a, b) {
+ sortByLabel: function(a, b) {
var x = a.label.toLowerCase();
var y = b.label.toLowerCase();
return ((x < y) ? -1 : ((x > y) ? 1 : 0));
@@ -376,7 +376,7 @@
* Method: sortById
* Sort stack by id values. Called by sort().
*/
- sortById: function(a, b) {
+ sortById: function(a, b) {
var x = a.id;
var y = b.id;
return ((x < y) ? -1 : ((x > y) ? 1 : 0));
@@ -399,6 +399,10 @@
* APIMethod: store
* Store the contents of the stack to a cookie referenced by
* cookieName.
+ *
+ * Parameters:
+ * value - {String} contents of stack if storing. empty if expiring.
+ * expires - {Integer} number of days to retain.
*/
store: function( value, expires) {
var expires = expires||this.cookieExpires
@@ -475,7 +479,8 @@
}
OpenLayers.Console.log("cookie not found");
return false;
- },
+ },
+
/**
* APIMethod: expire
* Expire cookie referenced by cookieName.
More information about the Commits
mailing list