Call goog.getUid in ol.Object constructor

This commit is contained in:
Tom Payne
2014-03-27 19:01:29 +01:00
parent e1b05ca4ca
commit 4e93fe2fbd

View File

@@ -48,6 +48,12 @@ ol.ObjectEventType = {
ol.ObjectEvent = function(type, key) {
goog.base(this, type);
// Call goog.getUid to ensure that the order of objects' ids is the same as
// the order in which they were created. This also helps to ensure that
// object properties are always added in the same order, which helps many
// JavaScript engines generate faster code.
goog.getUid(this);
/**
* The name of the property whose value is changing.
* @type {string}