Use ol.object.assign() instead of goog.object.extend()

This commit is contained in:
Tim Schaub
2016-02-03 09:37:38 -07:00
parent a74af66d5f
commit 3c0ef430db
14 changed files with 49 additions and 51 deletions

View File

@@ -3,7 +3,6 @@ goog.provide('ol.format.GML3');
goog.require('goog.asserts');
goog.require('goog.dom.NodeType');
goog.require('goog.object');
goog.require('ol');
goog.require('ol.array');
goog.require('ol.Feature');
@@ -1270,7 +1269,7 @@ ol.format.GML3.prototype.writeGeometryNode = function(geometry, opt_options) {
curve: this.curve_, surface: this.surface_,
multiSurface: this.multiSurface_, multiCurve: this.multiCurve_};
if (opt_options) {
goog.object.extend(context, opt_options);
ol.object.assign(context, opt_options);
}
this.writeGeometryElement(geom, geometry, [context]);
return geom;
@@ -1313,7 +1312,7 @@ ol.format.GML3.prototype.writeFeaturesNode = function(features, opt_options) {
featureType: this.featureType
};
if (opt_options) {
goog.object.extend(context, opt_options);
ol.object.assign(context, opt_options);
}
this.writeFeatureMembers_(node, features, [context]);
return node;

View File

@@ -20,6 +20,7 @@ goog.require('ol.geom.MultiPoint');
goog.require('ol.geom.MultiPolygon');
goog.require('ol.geom.Point');
goog.require('ol.geom.Polygon');
goog.require('ol.object');
goog.require('ol.proj');
goog.require('ol.xml');
@@ -607,7 +608,7 @@ ol.format.GMLBase.prototype.readFeaturesFromNode = function(node, opt_options) {
featureNS: this.featureNS
};
if (opt_options) {
goog.object.extend(options, this.getReadOptions(node, opt_options));
ol.object.assign(options, this.getReadOptions(node, opt_options));
}
return this.readFeaturesInternal(node, [options]);
};

View File

@@ -2,7 +2,6 @@ goog.provide('ol.format.WFS');
goog.require('goog.asserts');
goog.require('goog.dom.NodeType');
goog.require('goog.object');
goog.require('ol');
goog.require('ol.format.GML3');
goog.require('ol.format.GMLBase');
@@ -123,7 +122,7 @@ ol.format.WFS.prototype.readFeaturesFromNode = function(node, opt_options) {
'featureType': this.featureType_,
'featureNS': this.featureNS_
};
goog.object.extend(context, this.getReadOptions(node,
ol.object.assign(context, this.getReadOptions(node,
opt_options ? opt_options : {}));
var objectStack = [context];
this.gmlFormat_.FEATURE_COLLECTION_PARSERS[ol.format.GMLBase.GMLNS][
@@ -699,7 +698,7 @@ ol.format.WFS.prototype.writeTransaction = function(inserts, updates, deletes,
if (inserts) {
obj = {node: node, featureNS: options.featureNS,
featureType: options.featureType, featurePrefix: options.featurePrefix};
goog.object.extend(obj, baseObj);
ol.object.assign(obj, baseObj);
ol.xml.pushSerializeAndPop(obj,
ol.format.WFS.TRANSACTION_SERIALIZERS_,
ol.xml.makeSimpleNodeFactory('Insert'), inserts,
@@ -708,7 +707,7 @@ ol.format.WFS.prototype.writeTransaction = function(inserts, updates, deletes,
if (updates) {
obj = {node: node, featureNS: options.featureNS,
featureType: options.featureType, featurePrefix: options.featurePrefix};
goog.object.extend(obj, baseObj);
ol.object.assign(obj, baseObj);
ol.xml.pushSerializeAndPop(obj,
ol.format.WFS.TRANSACTION_SERIALIZERS_,
ol.xml.makeSimpleNodeFactory('Update'), updates,

View File

@@ -2,10 +2,10 @@ goog.provide('ol.format.WMSGetFeatureInfo');
goog.require('goog.asserts');
goog.require('goog.dom.NodeType');
goog.require('goog.object');
goog.require('ol.array');
goog.require('ol.format.GML2');
goog.require('ol.format.XMLFeature');
goog.require('ol.object');
goog.require('ol.xml');
@@ -154,7 +154,7 @@ ol.format.WMSGetFeatureInfo.prototype.readFeaturesFromNode = function(node, opt_
'featureNS': this.featureNS
};
if (opt_options) {
goog.object.extend(options, this.getReadOptions(node, opt_options));
ol.object.assign(options, this.getReadOptions(node, opt_options));
}
return this.readFeatures_(node, [options]);
};