Merge pull request #866 from fredj/object.setOptions

Api docs does not list Object#setValues
This commit is contained in:
Frédéric Junod
2013-07-17 23:56:24 -07:00
2 changed files with 4 additions and 12 deletions
-1
View File
@@ -5,7 +5,6 @@
@exportProperty ol.Object.prototype.on @exportProperty ol.Object.prototype.on
@exportProperty ol.Object.prototype.once @exportProperty ol.Object.prototype.once
@exportProperty ol.Object.prototype.set @exportProperty ol.Object.prototype.set
@exportProperty ol.Object.prototype.setOptions
@exportProperty ol.Object.prototype.setValues @exportProperty ol.Object.prototype.setValues
@exportProperty ol.Object.prototype.un @exportProperty ol.Object.prototype.un
@exportProperty ol.Object.prototype.unByKey @exportProperty ol.Object.prototype.unByKey
+4 -11
View File
@@ -281,12 +281,12 @@ ol.Object.prototype.set = function(key, value) {
/** /**
* Sets a collection of key-value pairs. * Sets a collection of key-value pairs.
* @param {Object.<string, *>} options Options. * @param {Object.<string, *>} values Values.
*/ */
ol.Object.prototype.setOptions = function(options) { ol.Object.prototype.setValues = function(values) {
var key, value, setterName; var key, value, setterName;
for (key in options) { for (key in values) {
value = options[key]; value = values[key];
setterName = ol.Object.getSetterName(key); setterName = ol.Object.getSetterName(key);
if (this[setterName]) { if (this[setterName]) {
this[setterName](value); this[setterName](value);
@@ -297,13 +297,6 @@ ol.Object.prototype.setOptions = function(options) {
}; };
/**
* Sets a collection of key-value pairs.
* @param {Object.<string, *>} values Values.
*/
ol.Object.prototype.setValues = ol.Object.prototype.setOptions;
/** /**
* Removes a binding. Unbinding will set the unbound property to the current * Removes a binding. Unbinding will set the unbound property to the current
* value. The object will not be notified, as the value has not changed. * value. The object will not be notified, as the value has not changed.