ol/geom/flate/inflate exports
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
/**
|
||||
* @module ol/geom/flat/inflate
|
||||
*/
|
||||
const _ol_geom_flat_inflate_ = {};
|
||||
|
||||
|
||||
/**
|
||||
@@ -12,7 +11,7 @@ const _ol_geom_flat_inflate_ = {};
|
||||
* @param {Array.<ol.Coordinate>=} opt_coordinates Coordinates.
|
||||
* @return {Array.<ol.Coordinate>} Coordinates.
|
||||
*/
|
||||
_ol_geom_flat_inflate_.coordinates = function(flatCoordinates, offset, end, stride, opt_coordinates) {
|
||||
export function inflateCoordinates(flatCoordinates, offset, end, stride, opt_coordinates) {
|
||||
const coordinates = opt_coordinates !== undefined ? opt_coordinates : [];
|
||||
let i = 0;
|
||||
for (let j = offset; j < end; j += stride) {
|
||||
@@ -20,7 +19,7 @@ _ol_geom_flat_inflate_.coordinates = function(flatCoordinates, offset, end, stri
|
||||
}
|
||||
coordinates.length = i;
|
||||
return coordinates;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -31,18 +30,18 @@ _ol_geom_flat_inflate_.coordinates = function(flatCoordinates, offset, end, stri
|
||||
* @param {Array.<Array.<ol.Coordinate>>=} opt_coordinatess Coordinatess.
|
||||
* @return {Array.<Array.<ol.Coordinate>>} Coordinatess.
|
||||
*/
|
||||
_ol_geom_flat_inflate_.coordinatess = function(flatCoordinates, offset, ends, stride, opt_coordinatess) {
|
||||
export function inflateCoordinatesArray(flatCoordinates, offset, ends, stride, opt_coordinatess) {
|
||||
const coordinatess = opt_coordinatess !== undefined ? opt_coordinatess : [];
|
||||
let i = 0;
|
||||
for (let j = 0, jj = ends.length; j < jj; ++j) {
|
||||
const end = ends[j];
|
||||
coordinatess[i++] = _ol_geom_flat_inflate_.coordinates(
|
||||
coordinatess[i++] = inflateCoordinates(
|
||||
flatCoordinates, offset, end, stride, coordinatess[i]);
|
||||
offset = end;
|
||||
}
|
||||
coordinatess.length = i;
|
||||
return coordinatess;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -54,16 +53,15 @@ _ol_geom_flat_inflate_.coordinatess = function(flatCoordinates, offset, ends, st
|
||||
* Coordinatesss.
|
||||
* @return {Array.<Array.<Array.<ol.Coordinate>>>} Coordinatesss.
|
||||
*/
|
||||
_ol_geom_flat_inflate_.coordinatesss = function(flatCoordinates, offset, endss, stride, opt_coordinatesss) {
|
||||
export function inflateMultiCoordinatesArray(flatCoordinates, offset, endss, stride, opt_coordinatesss) {
|
||||
const coordinatesss = opt_coordinatesss !== undefined ? opt_coordinatesss : [];
|
||||
let i = 0;
|
||||
for (let j = 0, jj = endss.length; j < jj; ++j) {
|
||||
const ends = endss[j];
|
||||
coordinatesss[i++] = _ol_geom_flat_inflate_.coordinatess(
|
||||
coordinatesss[i++] = inflateCoordinatesArray(
|
||||
flatCoordinates, offset, ends, stride, coordinatesss[i]);
|
||||
offset = ends[ends.length - 1];
|
||||
}
|
||||
coordinatesss.length = i;
|
||||
return coordinatesss;
|
||||
};
|
||||
export default _ol_geom_flat_inflate_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user