Rename misnamed functions in geom/flat/orient

- Rename linearRingIsOriented => linearRingsAreOriented
  The function checks all linear rings of a Polygon, so
  the plural "rings" is more appropriate
- Rename linearRingsAreOriented => linearRingssAreOriented
  The double s is appropriate because the check is done for
  all Polygons of a MultiPolygon

This commit restores the function names from OpenLayers v4,
they were changed (wrongly IMHO) in #7820.
This commit is contained in:
Roman Zoller
2019-02-05 17:35:29 +01:00
parent c4be22b1b6
commit 2c859b1196
4 changed files with 13 additions and 13 deletions
+2 -2
View File
@@ -16,7 +16,7 @@ import {deflateCoordinatesArray} from './flat/deflate.js';
import {inflateCoordinatesArray} from './flat/inflate.js';
import {getInteriorPointOfArray} from './flat/interiorpoint.js';
import {intersectsLinearRingArray} from './flat/intersectsextent.js';
import {linearRingIsOriented, orientLinearRings} from './flat/orient.js';
import {linearRingsAreOriented, orientLinearRings} from './flat/orient.js';
import {quantizeArray} from './flat/simplify.js';
import {modulo} from '../math.js';
@@ -266,7 +266,7 @@ class Polygon extends SimpleGeometry {
getOrientedFlatCoordinates() {
if (this.orientedRevision_ != this.getRevision()) {
const flatCoordinates = this.flatCoordinates;
if (linearRingIsOriented(
if (linearRingsAreOriented(
flatCoordinates, 0, this.ends_, this.stride)) {
this.orientedFlatCoordinates_ = flatCoordinates;
} else {