Move deflateCoodinates into ol.geom.flat
This commit is contained in:
@@ -3,7 +3,7 @@ goog.provide('ol.test.geom');
|
||||
|
||||
describe('ol.geom', function() {
|
||||
|
||||
describe('ol.geom.deflateCoordinates', function() {
|
||||
describe('ol.geom.flat.deflateCoordinates', function() {
|
||||
|
||||
var flatCoordinates;
|
||||
beforeEach(function() {
|
||||
@@ -11,7 +11,7 @@ describe('ol.geom', function() {
|
||||
});
|
||||
|
||||
it('flattens coordinates', function() {
|
||||
var offset = ol.geom.deflateCoordinates(
|
||||
var offset = ol.geom.flat.deflateCoordinates(
|
||||
flatCoordinates, 0, [[1, 2], [3, 4]], 2);
|
||||
expect(offset).to.be(4);
|
||||
expect(flatCoordinates).to.eql([1, 2, 3, 4]);
|
||||
@@ -19,7 +19,7 @@ describe('ol.geom', function() {
|
||||
|
||||
});
|
||||
|
||||
describe('ol.geom.deflateCoordinatess', function() {
|
||||
describe('ol.geom.flat.deflateCoordinatess', function() {
|
||||
|
||||
var flatCoordinates;
|
||||
beforeEach(function() {
|
||||
@@ -27,7 +27,7 @@ describe('ol.geom', function() {
|
||||
});
|
||||
|
||||
it('flattens arrays of coordinates', function() {
|
||||
var ends = ol.geom.deflateCoordinatess(flatCoordinates, 0,
|
||||
var ends = ol.geom.flat.deflateCoordinatess(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]);
|
||||
@@ -196,3 +196,6 @@ describe('ol.geom', function() {
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
goog.require('ol.geom.flat');
|
||||
|
||||
Reference in New Issue
Block a user