Fix location of call to goog.getUid, thanks @elemoine

This commit is contained in:
Tom Payne
2014-03-27 22:22:54 +01:00
parent 16054cb753
commit 7db06b61de

View File

@@ -48,12 +48,6 @@ 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}
@@ -121,6 +115,12 @@ ol.ObjectAccessor.prototype.transform = function(from, to) {
ol.Object = function(opt_values) {
goog.base(this);
// 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);
/**
* @private
* @type {Object.<string, *>}