Named export for SimpleGeometry.getStrideForLayout function
This commit is contained in:
@@ -67,7 +67,7 @@ function getLayoutForStride(stride) {
|
||||
* @param {ol.geom.GeometryLayout} layout Layout.
|
||||
* @return {number} Stride.
|
||||
*/
|
||||
SimpleGeometry.getStrideForLayout = function(layout) {
|
||||
export function getStrideForLayout(layout) {
|
||||
var stride;
|
||||
if (layout == GeometryLayout.XY) {
|
||||
stride = 2;
|
||||
@@ -77,7 +77,7 @@ SimpleGeometry.getStrideForLayout = function(layout) {
|
||||
stride = 4;
|
||||
}
|
||||
return /** @type {number} */ (stride);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -204,7 +204,7 @@ SimpleGeometry.prototype.getStride = function() {
|
||||
* @protected
|
||||
*/
|
||||
SimpleGeometry.prototype.setFlatCoordinatesInternal = function(layout, flatCoordinates) {
|
||||
this.stride = SimpleGeometry.getStrideForLayout(layout);
|
||||
this.stride = getStrideForLayout(layout);
|
||||
this.layout = layout;
|
||||
this.flatCoordinates = flatCoordinates;
|
||||
};
|
||||
@@ -228,7 +228,7 @@ SimpleGeometry.prototype.setLayout = function(layout, coordinates, nesting) {
|
||||
/** @type {number} */
|
||||
var stride;
|
||||
if (layout) {
|
||||
stride = SimpleGeometry.getStrideForLayout(layout);
|
||||
stride = getStrideForLayout(layout);
|
||||
} else {
|
||||
var i;
|
||||
for (i = 0; i < nesting; ++i) {
|
||||
|
||||
Reference in New Issue
Block a user