Method that copies properties from another object moved to the BaseObject class. Not using getProperties() to avoid creating an intermediate object that is not used later
This commit is contained in:
@@ -188,6 +188,18 @@ class BaseObject extends Observable {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply any properties from another object without triggering events.
|
||||
* @param {BaseObject} source The source object.
|
||||
* @protected
|
||||
*/
|
||||
applyProperties(source) {
|
||||
if (!source.values_) {
|
||||
return;
|
||||
}
|
||||
assign(this.values_ || (this.values_ = {}), source.values_);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets a property.
|
||||
* @param {string} key Key name.
|
||||
|
||||
Reference in New Issue
Block a user