Merge pull request #866 from fredj/object.setOptions
Api docs does not list Object#setValues
This commit is contained in:
@@ -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
@@ -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.
|
||||||
|
|||||||
Reference in New Issue
Block a user