Improve type checking in ol.color.fromString

This commit is contained in:
Tom Payne
2013-12-13 15:52:26 +01:00
parent 58b4d73f3b
commit 8ed6d760f7
+5 -1
View File
@@ -142,7 +142,11 @@ ol.color.equals = function(color1, color2) {
* @param {ol.Color=} opt_color Color. * @param {ol.Color=} opt_color Color.
* @return {ol.Color} Color. * @return {ol.Color} Color.
*/ */
ol.color.fromString = (function() { ol.color.fromString = (
/**
* @return {function(string, ol.Color=): ol.Color}
*/
function() {
// We maintain a small cache of parsed strings. To provide cheap LRU-like // We maintain a small cache of parsed strings. To provide cheap LRU-like
// semantics, whenever the cache grows too large we simply delete an // semantics, whenever the cache grows too large we simply delete an