Document and test ol.getUid sequence behavior

This commit is contained in:
Thomas Moelhave
2016-09-02 09:09:24 +02:00
parent 617dca34f5
commit eddfc04ccc
2 changed files with 25 additions and 2 deletions

View File

@@ -270,8 +270,8 @@ ol.nullFunction = function() {};
/**
* Gets a unique ID for an object. This mutates the object so that further calls
* with the same object as a parameter returns the same value. Adapted from
* goog.getUid.
* with the same object as a parameter returns the same value. Unique IDs are generated
* as a strictly increasing sequence. Adapted from goog.getUid.
*
* @param {Object} obj The object to get the unique ID for.
* @return {number} The unique ID for the object.