ol/geom/flat/deflate exports

This commit is contained in:
raiyni
2018-02-12 23:18:53 -06:00
parent fd78aa9798
commit fb548b1b45
11 changed files with 31 additions and 33 deletions

View File

@@ -1,4 +1,4 @@
import _ol_geom_flat_deflate_ from '../../../../../src/ol/geom/flat/deflate.js';
import {deflateCoordinates, deflateCoordinatesArray} from '../../../../../src/ol/geom/flat/deflate.js';
describe('ol.geom.flat.deflate', function() {
@@ -11,7 +11,7 @@ describe('ol.geom.flat.deflate', function() {
});
it('flattens coordinates', function() {
const offset = _ol_geom_flat_deflate_.coordinates(
const offset = deflateCoordinates(
flatCoordinates, 0, [[1, 2], [3, 4]], 2);
expect(offset).to.be(4);
expect(flatCoordinates).to.eql([1, 2, 3, 4]);
@@ -27,7 +27,7 @@ describe('ol.geom.flat.deflate', function() {
});
it('flattens arrays of coordinates', function() {
const ends = _ol_geom_flat_deflate_.coordinatess(flatCoordinates, 0,
const ends = deflateCoordinatesArray(flatCoordinates, 0,
[[[1, 2], [3, 4]], [[5, 6], [7, 8]]], 2);
expect(ends).to.eql([4, 8]);
expect(flatCoordinates).to.eql([1, 2, 3, 4, 5, 6, 7, 8]);