Remove original handling on ol.Feature

This is another attempt to bring master closer to the
vector-api branch. In anticipation of the ability to keep track
of modifications on ol.Object through a beforechange event
(d7e4be0), we will be able to manage originals on the
application level or in a separate component outside of
ol.Feature.
This commit is contained in:
ahocevar
2013-12-09 18:33:34 +01:00
parent d53ad07279
commit 211e288f33
3 changed files with 1 additions and 37 deletions
+1 -6
View File
@@ -157,17 +157,12 @@ ol.parser.ogc.WFS_v1 = function(opt_options) {
}
// add in fields
var original = feature.getOriginal();
var originalAttributes = goog.isNull(original) ?
undefined : original.getAttributes();
var attributes = feature.getAttributes();
var attribute;
for (var key in attributes) {
attribute = attributes[key];
// TODO Only add geometries whose values have changed
if (goog.isDef(attribute) && (attribute instanceof ol.geom.Geometry ||
(!goog.isDef(originalAttributes) ||
attribute != originalAttributes[key]))) {
if (goog.isDef(attribute)) {
this.writeNode('Property', {name: key, value: attribute}, null, node);
}
}