Whitespace changes only.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
goog.provide('ol.geom.collection');
|
||||
goog.provide('ol.geom.collection');
|
||||
|
||||
goog.require('ol.geom.Collection');
|
||||
goog.require('ol.geom.point');
|
||||
goog.require('ol.geom.point');
|
||||
goog.require('ol.projection');
|
||||
|
||||
/**
|
||||
@@ -10,11 +10,11 @@ goog.require('ol.projection');
|
||||
* @return {ol.geom.Collection} Collection.
|
||||
*/
|
||||
ol.geom.collection = function(opt_arg){
|
||||
|
||||
|
||||
if (opt_arg instanceof ol.geom.Collection) {
|
||||
return opt_arg;
|
||||
}
|
||||
|
||||
|
||||
var components = [];
|
||||
if (arguments.length == 1 && goog.isDef(opt_arg)) {
|
||||
if (goog.isArray(opt_arg)) {
|
||||
@@ -35,7 +35,7 @@ ol.geom.collection = function(opt_arg){
|
||||
throw new Error('ol.geom.collection');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var c = new ol.geom.Collection(components);
|
||||
return c;
|
||||
};
|
||||
@@ -50,7 +50,7 @@ ol.geom.Collection.prototype.components = function(opt_arg){
|
||||
if (arguments.length == 1 && goog.isDef(opt_arg)) {
|
||||
var components = [],
|
||||
allValid = false;
|
||||
|
||||
|
||||
allValid = goog.array.every(opt_arg, function(geom){
|
||||
if (geom instanceof ol.geom.Geometry) {
|
||||
components.push(geom);
|
||||
@@ -90,23 +90,23 @@ ol.geom.Collection.prototype.add = function(geom, opt_index){
|
||||
* @export
|
||||
* @param {Array.<ol.geom.Geometry>} components Some point specifications.
|
||||
* @param {number=} opt_index An optional index to add the components at. If not
|
||||
* provided, the components will be added to the end of the list of
|
||||
* provided, the components will be added to the end of the list of
|
||||
* components.
|
||||
* @return {ol.geom.Collection} The Collection instance.
|
||||
*/
|
||||
ol.geom.Collection.prototype.addAll = function(components, opt_index){
|
||||
var index = this.components_.length;
|
||||
|
||||
|
||||
if (arguments.length == 2 && goog.isDef(opt_index)) {
|
||||
index = opt_index;
|
||||
}
|
||||
|
||||
|
||||
goog.array.every(components, function(c){
|
||||
this.addComponent(c, index);
|
||||
index++;
|
||||
return true;
|
||||
}, this);
|
||||
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
goog.provide('ol.geom.geometry');
|
||||
goog.provide('ol.geom.geometry');
|
||||
|
||||
goog.require('ol.geom.Geometry');
|
||||
|
||||
@@ -14,7 +14,7 @@ ol.geom.geometry = function(){
|
||||
/**
|
||||
* @export
|
||||
* @param {ol.Bounds=} opt_arg new Bounds.
|
||||
* @return {ol.geom.Geometry|ol.Bounds|undefined} either a Geometry (when used as
|
||||
* @return {ol.geom.Geometry|ol.Bounds|undefined} either a Geometry (when used as
|
||||
* setter) or a Bounds/undefined (if used as getter).
|
||||
*/
|
||||
ol.geom.Geometry.prototype.bounds = function(opt_arg) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
goog.provide('ol.geom.linestring');
|
||||
goog.provide('ol.geom.linestring');
|
||||
|
||||
goog.require('ol.geom.LineString');
|
||||
goog.require('ol.geom.point');
|
||||
goog.require('ol.geom.point');
|
||||
goog.require('ol.projection');
|
||||
|
||||
/**
|
||||
@@ -10,11 +10,11 @@ goog.require('ol.projection');
|
||||
* @return {ol.geom.LineString} LineString.
|
||||
*/
|
||||
ol.geom.linestring = function(opt_arg){
|
||||
|
||||
|
||||
if (opt_arg instanceof ol.geom.LineString) {
|
||||
return opt_arg;
|
||||
}
|
||||
|
||||
|
||||
var vertices = [];
|
||||
if (arguments.length == 1 && goog.isDef(opt_arg)) {
|
||||
if (goog.isArray(opt_arg)) {
|
||||
@@ -36,7 +36,7 @@ ol.geom.linestring = function(opt_arg){
|
||||
throw new Error('ol.geom.linestring');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var ls = new ol.geom.LineString(vertices);
|
||||
return ls;
|
||||
};
|
||||
@@ -99,18 +99,18 @@ ol.geom.LineString.prototype.add = function(vertex, opt_index){
|
||||
ol.geom.LineString.prototype.addAll = function(vertices, opt_index){
|
||||
var index = this.vertices_.length,
|
||||
v;
|
||||
|
||||
|
||||
if (arguments.length == 2 && goog.isDef(opt_index)) {
|
||||
index = opt_index;
|
||||
}
|
||||
|
||||
|
||||
goog.array.every(vertices, function(vertexSpec){
|
||||
v = ol.geom.point(vertexSpec);
|
||||
this.addVertex(v, index);
|
||||
index++;
|
||||
return true;
|
||||
}, this);
|
||||
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
goog.provide('ol.geom.multipoint');
|
||||
goog.provide('ol.geom.multipoint');
|
||||
|
||||
goog.require('ol.geom.MultiPoint');
|
||||
goog.require('ol.geom.point');
|
||||
goog.require('ol.geom.collection');
|
||||
goog.require('ol.geom.point');
|
||||
goog.require('ol.geom.collection');
|
||||
goog.require('ol.projection');
|
||||
|
||||
/**
|
||||
@@ -11,11 +11,11 @@ goog.require('ol.projection');
|
||||
* @return {ol.geom.MultiPoint} MultiPoint.
|
||||
*/
|
||||
ol.geom.multipoint = function(opt_arg){
|
||||
|
||||
|
||||
if (opt_arg instanceof ol.geom.MultiPoint) {
|
||||
return opt_arg;
|
||||
}
|
||||
|
||||
|
||||
var points = [];
|
||||
if (arguments.length == 1 && goog.isDef(opt_arg)) {
|
||||
if (goog.isArray(opt_arg)) {
|
||||
@@ -37,7 +37,7 @@ ol.geom.multipoint = function(opt_arg){
|
||||
throw new Error('ol.geom.multipoint');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var mp = new ol.geom.MultiPoint(points);
|
||||
return mp;
|
||||
};
|
||||
@@ -99,18 +99,18 @@ ol.geom.MultiPoint.prototype.add = function(point, opt_index){
|
||||
ol.geom.MultiPoint.prototype.addAll = function(points, opt_index){
|
||||
var index = this.getPoints().length,
|
||||
p;
|
||||
|
||||
|
||||
if (arguments.length == 2 && goog.isDef(opt_index)) {
|
||||
index = opt_index;
|
||||
}
|
||||
|
||||
|
||||
goog.array.every(points, function(pointSpec){
|
||||
p = ol.geom.point(pointSpec);
|
||||
this.addPoint(p, index);
|
||||
index++;
|
||||
return true;
|
||||
}, this);
|
||||
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
@@ -132,6 +132,6 @@ ol.geom.MultiPoint.prototype.remove = function(points){
|
||||
this.removePoint(p);
|
||||
return true;
|
||||
}, this);
|
||||
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user