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
+6 -6
View File
@@ -6,7 +6,7 @@ import _ol_array_ from '../../../../src/ol/array.js';
import _ol_events_ from '../../../../src/ol/events.js';
import _ol_events_condition_ from '../../../../src/ol/events/condition.js';
import _ol_geom_Circle_ from '../../../../src/ol/geom/Circle.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';
@@ -284,7 +284,7 @@ describe('ol.interaction.Draw', function() {
var features = source.getFeatures();
expect(features).to.have.length(1);
var geometry = features[0].getGeometry();
expect(geometry).to.be.a(_ol_geom_LineString_);
expect(geometry).to.be.a(LineString);
expect(geometry.getCoordinates()).to.eql([[10, -20], [30, -20]]);
});
@@ -326,7 +326,7 @@ describe('ol.interaction.Draw', function() {
var features = source.getFeatures();
expect(features).to.have.length(1);
var geometry = features[0].getGeometry();
expect(geometry).to.be.a(_ol_geom_LineString_);
expect(geometry).to.be.a(LineString);
expect(geometry.getCoordinates()).to.eql(
[[10, -20], [20, -30], [20, -40]]);
});
@@ -363,7 +363,7 @@ describe('ol.interaction.Draw', function() {
var features = source.getFeatures();
// expect(features).to.have.length(1);
var geometry = features[0].getGeometry();
expect(geometry).to.be.a(_ol_geom_LineString_);
expect(geometry).to.be.a(LineString);
expect(geometry.getCoordinates()).to.eql(
[[10, -20], [20, -30], [30, -40], [40, -50], [50, -60], [60, -70]]);
});
@@ -392,7 +392,7 @@ describe('ol.interaction.Draw', function() {
var features = source.getFeatures();
expect(features).to.have.length(1);
var geometry = features[0].getGeometry();
expect(geometry).to.be.a(_ol_geom_LineString_);
expect(geometry).to.be.a(LineString);
expect(geometry.getCoordinates()).to.eql([[10, -20], [30, -20]]);
});
@@ -1036,7 +1036,7 @@ describe('ol.interaction.Draw', function() {
});
map.addInteraction(draw);
feature = new _ol_Feature_(
new _ol_geom_LineString_([[0, 0], [1, 1], [2, 0]]));
new LineString([[0, 0], [1, 1], [2, 0]]));
});
it('sets the initial state', function() {
+5 -5
View File
@@ -6,7 +6,7 @@ import _ol_View_ from '../../../../src/ol/View.js';
import _ol_events_ from '../../../../src/ol/events.js';
import _ol_events_condition_ from '../../../../src/ol/events/condition.js';
import _ol_geom_Circle_ from '../../../../src/ol/geom/Circle.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';
import _ol_interaction_Modify_ from '../../../../src/ol/interaction/Modify.js';
@@ -226,7 +226,7 @@ describe('ol.interaction.Modify', function() {
it('deletes first vertex of a LineString', function() {
var lineFeature = new _ol_Feature_({
geometry: new _ol_geom_LineString_(
geometry: new LineString(
[[0, 0], [10, 20], [0, 40], [40, 40], [40, 0]]
)
});
@@ -262,7 +262,7 @@ describe('ol.interaction.Modify', function() {
it('deletes last vertex of a LineString', function() {
var lineFeature = new _ol_Feature_({
geometry: new _ol_geom_LineString_(
geometry: new LineString(
[[0, 0], [10, 20], [0, 40], [40, 40], [40, 0]]
)
});
@@ -298,7 +298,7 @@ describe('ol.interaction.Modify', function() {
it('deletes vertex of a LineString programmatically', function() {
var lineFeature = new _ol_Feature_({
geometry: new _ol_geom_LineString_(
geometry: new LineString(
[[0, 0], [10, 20], [0, 40], [40, 40], [40, 0]]
)
});
@@ -340,7 +340,7 @@ describe('ol.interaction.Modify', function() {
it('keeps the third dimension', function() {
var lineFeature = new _ol_Feature_({
geometry: new _ol_geom_LineString_(
geometry: new LineString(
[[0, 0, 10], [10, 20, 20], [0, 40, 30], [40, 40, 40], [40, 0, 50]]
)
});
+7 -7
View File
@@ -4,7 +4,7 @@ import _ol_Map_ from '../../../../src/ol/Map.js';
import _ol_View_ from '../../../../src/ol/View.js';
import _ol_geom_Circle_ from '../../../../src/ol/geom/Circle.js';
import Point from '../../../../src/ol/geom/Point.js';
import _ol_geom_LineString_ from '../../../../src/ol/geom/LineString.js';
import LineString from '../../../../src/ol/geom/LineString.js';
import _ol_interaction_Snap_ from '../../../../src/ol/interaction/Snap.js';
@@ -73,7 +73,7 @@ describe('ol.interaction.Snap', function() {
});
it('snaps to edges only', function() {
var point = new _ol_Feature_(new _ol_geom_LineString_([[-10, 0], [10, 0]]));
var point = new _ol_Feature_(new LineString([[-10, 0], [10, 0]]));
var snapInteraction = new _ol_interaction_Snap_({
features: new _ol_Collection_([point]),
pixelTolerance: 5,
@@ -91,7 +91,7 @@ describe('ol.interaction.Snap', function() {
});
it('snaps to vertices only', function() {
var point = new _ol_Feature_(new _ol_geom_LineString_([[-10, 0], [10, 0]]));
var point = new _ol_Feature_(new LineString([[-10, 0], [10, 0]]));
var snapInteraction = new _ol_interaction_Snap_({
features: new _ol_Collection_([point]),
pixelTolerance: 5,
@@ -136,7 +136,7 @@ describe('ol.interaction.Snap', function() {
});
snapInteraction.setMap(map);
feature.setGeometry(new _ol_geom_LineString_([[-10, 0], [10, 0]]));
feature.setGeometry(new LineString([[-10, 0], [10, 0]]));
var event = {
pixel: [7 + width / 2, height / 2 - 4],
@@ -148,7 +148,7 @@ describe('ol.interaction.Snap', function() {
});
it('handle geometry changes', function() {
var line = new _ol_Feature_(new _ol_geom_LineString_([[-10, 0], [0, 0]]));
var line = new _ol_Feature_(new LineString([[-10, 0], [0, 0]]));
var snapInteraction = new _ol_interaction_Snap_({
features: new _ol_Collection_([line]),
pixelTolerance: 5,
@@ -169,8 +169,8 @@ describe('ol.interaction.Snap', function() {
it('handle geometry name changes', function() {
var line = new _ol_Feature_({
geometry: new _ol_geom_LineString_([[-10, 0], [0, 0]]),
alt_geometry: new _ol_geom_LineString_([[-10, 0], [10, 0]])
geometry: new LineString([[-10, 0], [0, 0]]),
alt_geometry: new LineString([[-10, 0], [10, 0]])
});
var snapInteraction = new _ol_interaction_Snap_({
features: new _ol_Collection_([line]),