Rename _ol_geom_LineString_ to LineString
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import _ol_geom_Geometry_ from '../../../../src/ol/geom/Geometry.js';
|
||||
import _ol_geom_GeometryCollection_ from '../../../../src/ol/geom/GeometryCollection.js';
|
||||
import _ol_geom_LineString_ from '../../../../src/ol/geom/LineString.js';
|
||||
import LineString from '../../../../src/ol/geom/LineString.js';
|
||||
import Point from '../../../../src/ol/geom/Point.js';
|
||||
import _ol_geom_Polygon_ from '../../../../src/ol/geom/Polygon.js';
|
||||
|
||||
@@ -15,7 +15,7 @@ describe('ol.geom.GeometryCollection', function() {
|
||||
var line, multi, point, poly;
|
||||
beforeEach(function() {
|
||||
point = new Point([10, 20]);
|
||||
line = new _ol_geom_LineString_([[10, 20], [30, 40]]);
|
||||
line = new LineString([[10, 20], [30, 40]]);
|
||||
poly = new _ol_geom_Polygon_([outer, inner1, inner2]);
|
||||
multi = new _ol_geom_GeometryCollection_([point, line, poly]);
|
||||
});
|
||||
@@ -57,7 +57,7 @@ describe('ol.geom.GeometryCollection', function() {
|
||||
|
||||
it('returns a collection of geometries', function() {
|
||||
var point = new Point([10, 20]);
|
||||
var line = new _ol_geom_LineString_([[10, 20], [30, 40]]);
|
||||
var line = new LineString([[10, 20], [30, 40]]);
|
||||
var poly = new _ol_geom_Polygon_([outer, inner1, inner2]);
|
||||
var multi = new _ol_geom_GeometryCollection_([point, line, poly]);
|
||||
|
||||
@@ -65,7 +65,7 @@ describe('ol.geom.GeometryCollection', function() {
|
||||
expect(geometries).to.be.an(Array);
|
||||
expect(geometries).to.have.length(3);
|
||||
expect(geometries[0]).to.be.a(Point);
|
||||
expect(geometries[1]).to.be.a(_ol_geom_LineString_);
|
||||
expect(geometries[1]).to.be.a(LineString);
|
||||
expect(geometries[2]).to.be.a(_ol_geom_Polygon_);
|
||||
});
|
||||
|
||||
@@ -75,7 +75,7 @@ describe('ol.geom.GeometryCollection', function() {
|
||||
|
||||
it('has a working clone method', function() {
|
||||
var point = new Point([10, 20]);
|
||||
var line = new _ol_geom_LineString_([[10, 20], [30, 40]]);
|
||||
var line = new LineString([[10, 20], [30, 40]]);
|
||||
var poly = new _ol_geom_Polygon_([outer, inner1, inner2]);
|
||||
var multi = new _ol_geom_GeometryCollection_([point, line, poly]);
|
||||
var clone = multi.clone();
|
||||
@@ -106,7 +106,7 @@ describe('ol.geom.GeometryCollection', function() {
|
||||
|
||||
it('returns the bounding extent', function() {
|
||||
var point = new Point([10, 2]);
|
||||
var line = new _ol_geom_LineString_([[1, 20], [30, 40]]);
|
||||
var line = new LineString([[1, 20], [30, 40]]);
|
||||
var multi = new _ol_geom_GeometryCollection_([point, line]);
|
||||
var extent = multi.getExtent();
|
||||
expect(extent[0]).to.be(1);
|
||||
@@ -123,7 +123,7 @@ describe('ol.geom.GeometryCollection', function() {
|
||||
|
||||
beforeEach(function() {
|
||||
point = new Point([5, 20]);
|
||||
line = new _ol_geom_LineString_([[10, 20], [30, 40]]);
|
||||
line = new LineString([[10, 20], [30, 40]]);
|
||||
poly = new _ol_geom_Polygon_([outer, inner1, inner2]);
|
||||
multi = new _ol_geom_GeometryCollection_([point, line, poly]);
|
||||
});
|
||||
@@ -152,7 +152,7 @@ describe('ol.geom.GeometryCollection', function() {
|
||||
var line, multi, point, poly;
|
||||
beforeEach(function() {
|
||||
point = new Point([10, 20]);
|
||||
line = new _ol_geom_LineString_([[10, 20], [30, 40]]);
|
||||
line = new LineString([[10, 20], [30, 40]]);
|
||||
poly = new _ol_geom_Polygon_([outer, inner1, inner2]);
|
||||
multi = new _ol_geom_GeometryCollection_([point, line, poly]);
|
||||
});
|
||||
@@ -177,7 +177,7 @@ describe('ol.geom.GeometryCollection', function() {
|
||||
it('scales a collection', function() {
|
||||
var geom = new _ol_geom_GeometryCollection_([
|
||||
new Point([-1, -2]),
|
||||
new _ol_geom_LineString_([[0, 0], [1, 2]])
|
||||
new LineString([[0, 0], [1, 2]])
|
||||
]);
|
||||
geom.scale(10);
|
||||
var geometries = geom.getGeometries();
|
||||
@@ -188,7 +188,7 @@ describe('ol.geom.GeometryCollection', function() {
|
||||
it('accepts sx and sy', function() {
|
||||
var geom = new _ol_geom_GeometryCollection_([
|
||||
new Point([-1, -2]),
|
||||
new _ol_geom_LineString_([[0, 0], [1, 2]])
|
||||
new LineString([[0, 0], [1, 2]])
|
||||
]);
|
||||
geom.scale(2, 3);
|
||||
var geometries = geom.getGeometries();
|
||||
@@ -199,7 +199,7 @@ describe('ol.geom.GeometryCollection', function() {
|
||||
it('accepts an anchor', function() {
|
||||
var geom = new _ol_geom_GeometryCollection_([
|
||||
new Point([-1, -2]),
|
||||
new _ol_geom_LineString_([[0, 0], [1, 2]])
|
||||
new LineString([[0, 0], [1, 2]])
|
||||
]);
|
||||
geom.scale(10, 15, [-1, -2]);
|
||||
var geometries = geom.getGeometries();
|
||||
@@ -214,7 +214,7 @@ describe('ol.geom.GeometryCollection', function() {
|
||||
var line, multi, point;
|
||||
beforeEach(function() {
|
||||
point = new Point([10, 20]);
|
||||
line = new _ol_geom_LineString_([[10, 20], [30, 40]]);
|
||||
line = new LineString([[10, 20], [30, 40]]);
|
||||
multi = new _ol_geom_GeometryCollection_([point, line]);
|
||||
});
|
||||
|
||||
@@ -223,7 +223,7 @@ describe('ol.geom.GeometryCollection', function() {
|
||||
|
||||
var geometries = multi.getGeometries();
|
||||
expect(geometries[0]).to.be.a(Point);
|
||||
expect(geometries[1]).to.be.a(_ol_geom_LineString_);
|
||||
expect(geometries[1]).to.be.a(LineString);
|
||||
|
||||
var coords = geometries[0].getCoordinates();
|
||||
expect(coords[0]).to.roughlyEqual(1113194.90, 1e-2);
|
||||
|
||||
Reference in New Issue
Block a user