Remove goog.array.extend

This commit is contained in:
Nicholas L
2016-01-17 15:45:57 +13:00
parent 1089934486
commit d1b6a17773
15 changed files with 53 additions and 39 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
goog.provide('ol.geom.LineString');
goog.require('goog.array');
goog.require('goog.asserts');
goog.require('ol');
goog.require('ol.array');
goog.require('ol.extent');
goog.require('ol.geom.GeometryLayout');
goog.require('ol.geom.GeometryType');
@@ -72,7 +72,7 @@ ol.geom.LineString.prototype.appendCoordinate = function(coordinate) {
if (!this.flatCoordinates) {
this.flatCoordinates = coordinate.slice();
} else {
goog.array.extend(this.flatCoordinates, coordinate);
ol.array.extend(this.flatCoordinates, coordinate);
}
this.changed();
};
+4 -4
View File
@@ -1,8 +1,8 @@
goog.provide('ol.geom.MultiLineString');
goog.require('goog.array');
goog.require('goog.asserts');
goog.require('ol');
goog.require('ol.array');
goog.require('ol.extent');
goog.require('ol.geom.GeometryLayout');
goog.require('ol.geom.GeometryType');
@@ -65,7 +65,7 @@ ol.geom.MultiLineString.prototype.appendLineString = function(lineString) {
if (!this.flatCoordinates) {
this.flatCoordinates = lineString.getFlatCoordinates().slice();
} else {
goog.array.extend(
ol.array.extend(
this.flatCoordinates, lineString.getFlatCoordinates().slice());
}
this.ends_.push(this.flatCoordinates.length);
@@ -216,7 +216,7 @@ ol.geom.MultiLineString.prototype.getFlatMidpoints = function() {
var end = ends[i];
var midpoint = ol.geom.flat.interpolate.lineString(
flatCoordinates, offset, end, stride, 0.5);
goog.array.extend(midpoints, midpoint);
ol.array.extend(midpoints, midpoint);
offset = end;
}
return midpoints;
@@ -319,7 +319,7 @@ ol.geom.MultiLineString.prototype.setLineStrings = function(lineStrings) {
goog.asserts.assert(lineString.getLayout() == layout,
'layout of lineString should match layout');
}
goog.array.extend(flatCoordinates, lineString.getFlatCoordinates());
ol.array.extend(flatCoordinates, lineString.getFlatCoordinates());
ends.push(flatCoordinates.length);
}
this.setFlatCoordinates(layout, flatCoordinates, ends);
+2 -2
View File
@@ -1,7 +1,7 @@
goog.provide('ol.geom.MultiPoint');
goog.require('goog.array');
goog.require('goog.asserts');
goog.require('ol.array');
goog.require('ol.extent');
goog.require('ol.geom.GeometryLayout');
goog.require('ol.geom.GeometryType');
@@ -40,7 +40,7 @@ ol.geom.MultiPoint.prototype.appendPoint = function(point) {
if (!this.flatCoordinates) {
this.flatCoordinates = point.getFlatCoordinates().slice();
} else {
goog.array.extend(this.flatCoordinates, point.getFlatCoordinates());
ol.array.extend(this.flatCoordinates, point.getFlatCoordinates());
}
this.changed();
};
+3 -3
View File
@@ -1,9 +1,9 @@
goog.provide('ol.geom.MultiPolygon');
goog.require('goog.array');
goog.require('goog.asserts');
goog.require('goog.object');
goog.require('ol');
goog.require('ol.array');
goog.require('ol.extent');
goog.require('ol.geom.GeometryLayout');
goog.require('ol.geom.GeometryType');
@@ -100,7 +100,7 @@ ol.geom.MultiPolygon.prototype.appendPolygon = function(polygon) {
this.endss_.push();
} else {
var offset = this.flatCoordinates.length;
goog.array.extend(this.flatCoordinates, polygon.getFlatCoordinates());
ol.array.extend(this.flatCoordinates, polygon.getFlatCoordinates());
ends = polygon.getEnds().slice();
var i, ii;
for (i = 0, ii = ends.length; i < ii; ++i) {
@@ -424,7 +424,7 @@ ol.geom.MultiPolygon.prototype.setPolygons = function(polygons) {
for (j = 0, jj = ends.length; j < jj; ++j) {
ends[j] += offset;
}
goog.array.extend(flatCoordinates, polygon.getFlatCoordinates());
ol.array.extend(flatCoordinates, polygon.getFlatCoordinates());
endss.push(ends);
}
this.setFlatCoordinates(layout, flatCoordinates, endss);
+3 -2
View File
@@ -4,6 +4,7 @@ goog.require('goog.array');
goog.require('goog.asserts');
goog.require('goog.math');
goog.require('ol');
goog.require('ol.array');
goog.require('ol.extent');
goog.require('ol.geom.GeometryLayout');
goog.require('ol.geom.GeometryType');
@@ -94,7 +95,7 @@ ol.geom.Polygon.prototype.appendLinearRing = function(linearRing) {
if (!this.flatCoordinates) {
this.flatCoordinates = linearRing.getFlatCoordinates().slice();
} else {
goog.array.extend(this.flatCoordinates, linearRing.getFlatCoordinates());
ol.array.extend(this.flatCoordinates, linearRing.getFlatCoordinates());
}
this.ends_.push(this.flatCoordinates.length);
this.changed();
@@ -390,7 +391,7 @@ ol.geom.Polygon.circular = function(sphere, center, radius, opt_n) {
var flatCoordinates = [];
var i;
for (i = 0; i < n; ++i) {
goog.array.extend(
ol.array.extend(
flatCoordinates, sphere.offset(center, radius, 2 * Math.PI * i / n));
}
flatCoordinates.push(flatCoordinates[0], flatCoordinates[1]);