Dispatch a change event only if the value is different

This commit is contained in:
Frederic Junod committed 2015-11-16 16:48:00 +01:00
1 parent 18c41bfc19
commit ca575bd35d
2 files changed
+10 -1

No files matched your search

+3 -1
View File
@@ -206,7 +206,9 @@ ol.Object.prototype.set = function(key, value, opt_silent) {
} else {
var oldValue = this.values_[key];
this.values_[key] = value;
this.notify(key, oldValue);
if (oldValue !== value) {
this.notify(key, oldValue);
}
}
};