Rename _ol_geom_LineString_ to LineString

This commit is contained in:
Tim Schaub
2017-12-14 08:54:53 -07:00
parent ad5806c29d
commit f7b3876c1b
55 changed files with 270 additions and 270 deletions

View File

@@ -1,6 +1,6 @@
import _ol_geom_Circle_ from '../../../../../src/ol/geom/Circle.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 _ol_geom_MultiLineString_ from '../../../../../src/ol/geom/MultiLineString.js';
import MultiPoint from '../../../../../src/ol/geom/MultiPoint.js';
import _ol_geom_MultiPolygon_ from '../../../../../src/ol/geom/MultiPolygon.js';
@@ -81,7 +81,7 @@ describe('ol.render.canvas.Immediate', function() {
var context = new _ol_render_canvas_Immediate_(getMockContext(), 1, extent);
sinon.spy(context, 'drawLineString');
var geometry = new _ol_geom_LineString_([[1, 2], [3, 4]]);
var geometry = new LineString([[1, 2], [3, 4]]);
context.drawGeometry(geometry);
expect(context.drawLineString.calledOnce).to.be(true);
expect(context.drawLineString.firstCall.calledWithExactly(geometry)).to.be(true);
@@ -135,7 +135,7 @@ describe('ol.render.canvas.Immediate', function() {
sinon.spy(context, 'drawPolygon');
var point = new Point([1, 2]);
var linestring = new _ol_geom_LineString_([[1, 2], [3, 4]]);
var linestring = new LineString([[1, 2], [3, 4]]);
var polygon = new _ol_geom_Polygon_([[[1, 2], [3, 4], [5, 6], [1, 2]]]);
var geometry = new _ol_geom_GeometryCollection_([point, linestring, polygon]);

View File

@@ -1,4 +1,4 @@
import _ol_geom_LineString_ from '../../../../src/ol/geom/LineString.js';
import LineString from '../../../../src/ol/geom/LineString.js';
import _ol_geom_MultiLineString_ from '../../../../src/ol/geom/MultiLineString.js';
import _ol_geom_MultiPolygon_ from '../../../../src/ol/geom/MultiPolygon.js';
import _ol_geom_Polygon_ from '../../../../src/ol/geom/Polygon.js';
@@ -78,7 +78,7 @@ describe('ol.render.Feature', function() {
describe('#getFlatMidpoint()', function() {
it('returns correct point', function() {
var line = new _ol_geom_LineString_([[0, 0], [0, 10], [10, 10], [10, 0], [0, 0]]);
var line = new LineString([[0, 0], [0, 10], [10, 10], [10, 0], [0, 0]]);
var feature = new _ol_render_Feature_('LineString', line.getFlatCoordinates());
expect(feature.getFlatMidpoint()).to.eql([10, 10]);
expect(feature.getFlatMidpoint()).to.eql(feature.flatMidpoints_);

View File

@@ -1,7 +1,7 @@
import _ol_Feature_ from '../../../../../src/ol/Feature.js';
import _ol_geom_Circle_ from '../../../../../src/ol/geom/Circle.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 _ol_geom_MultiLineString_ from '../../../../../src/ol/geom/MultiLineString.js';
import MultiPoint from '../../../../../src/ol/geom/MultiPoint.js';
import _ol_geom_MultiPolygon_ from '../../../../../src/ol/geom/MultiPolygon.js';
@@ -27,7 +27,7 @@ describe('ol.render.webgl.Immediate', function() {
stroke: new _ol_style_Stroke_()
});
circle = new _ol_geom_Circle_([0, 0], 5);
line = new _ol_geom_LineString_([[0, 0], [5, 5]]);
line = new LineString([[0, 0], [5, 5]]);
multiLine = new _ol_geom_MultiLineString_([[[0, 0], [5, 5]]]);
point = new Point([0, 0]);
multiPoint = new MultiPoint([[0, 0]]);

View File

@@ -1,6 +1,6 @@
import {getUid} from '../../../../../src/ol/index.js';
import _ol_Feature_ from '../../../../../src/ol/Feature.js';
import _ol_geom_LineString_ from '../../../../../src/ol/geom/LineString.js';
import LineString from '../../../../../src/ol/geom/LineString.js';
import _ol_geom_MultiLineString_ from '../../../../../src/ol/geom/MultiLineString.js';
import _ol_render_webgl_LineStringReplay_ from '../../../../../src/ol/render/webgl/LineStringReplay.js';
import _ol_render_webgl_linestringreplay_defaultshader_ from '../../../../../src/ol/render/webgl/linestringreplay/defaultshader.js';
@@ -56,7 +56,7 @@ describe('ol.render.webgl.LineStringReplay', function() {
it('sets the buffer data', function() {
var linestring;
linestring = new _ol_geom_LineString_(
linestring = new LineString(
[[1000, 2000], [2000, 3000]]);
replay.setFillStrokeStyle(null, strokeStyle1);
replay.drawLineString(linestring, null);
@@ -66,7 +66,7 @@ describe('ol.render.webgl.LineStringReplay', function() {
expect(replay.startIndices).to.have.length(1);
expect(replay.startIndicesFeature).to.have.length(1);
linestring = new _ol_geom_LineString_(
linestring = new LineString(
[[1000, 3000], [2000, 4000], [3000, 3000]]);
replay.drawLineString(linestring, null);
expect(replay.vertices).to.have.length(140);
@@ -106,7 +106,7 @@ describe('ol.render.webgl.LineStringReplay', function() {
lineJoin: 'bevel'
});
linestring = new _ol_geom_LineString_(
linestring = new LineString(
[[1000, 3000], [2000, 4000], [3000, 3000]]);
var flatCoordinates = linestring.getFlatCoordinates();
replay.setFillStrokeStyle(null, stroke);
@@ -126,7 +126,7 @@ describe('ol.render.webgl.LineStringReplay', function() {
lineCap: 'butt'
});
linestring = new _ol_geom_LineString_(
linestring = new LineString(
[[1000, 3000], [2000, 4000], [3000, 3000]]);
var flatCoordinates = linestring.getFlatCoordinates();
replay.setFillStrokeStyle(null, stroke);
@@ -145,7 +145,7 @@ describe('ol.render.webgl.LineStringReplay', function() {
color: [0, 255, 0, 1]
});
linestring = new _ol_geom_LineString_(
linestring = new LineString(
[[1000, 3000], [2000, 4000], [3000, 3000]]);
var flatCoordinates = linestring.getFlatCoordinates();
replay.setFillStrokeStyle(null, stroke);
@@ -168,7 +168,7 @@ describe('ol.render.webgl.LineStringReplay', function() {
lineJoin: 'bevel'
});
linestring = new _ol_geom_LineString_(
linestring = new LineString(
[[1000, 3000], [2000, 2000], [3000, 3000]]);
var flatCoordinates = linestring.getFlatCoordinates();
replay.setFillStrokeStyle(null, stroke);
@@ -189,7 +189,7 @@ describe('ol.render.webgl.LineStringReplay', function() {
lineJoin: 'bevel'
});
linestring = new _ol_geom_LineString_(
linestring = new LineString(
[[1000, 3000], [2000, 4000], [3000, 3000], [1000, 3000]]);
var flatCoordinates = linestring.getFlatCoordinates();
replay.setFillStrokeStyle(null, stroke);
@@ -287,13 +287,13 @@ describe('ol.render.webgl.LineStringReplay', function() {
describe('#drawReplay', function() {
var gl, context;
var feature1 = new _ol_Feature_({
geometry: new _ol_geom_LineString_([[0, 0], [500, 500]])
geometry: new LineString([[0, 0], [500, 500]])
});
var feature2 = new _ol_Feature_({
geometry: new _ol_geom_LineString_([[0, 0], [500, 500]])
geometry: new LineString([[0, 0], [500, 500]])
});
var feature3 = new _ol_Feature_({
geometry: new _ol_geom_LineString_([[0, 0], [500, 500]])
geometry: new LineString([[0, 0], [500, 500]])
});
beforeEach(function() {
gl = {