Rename _ol_Feature_ to Feature

This commit is contained in:
Tim Schaub
2018-01-08 09:35:02 -07:00
parent 6934e148ca
commit 22fce4f97b
79 changed files with 630 additions and 630 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
import _ol_Feature_ from '../../../../src/ol/Feature.js';
import Feature from '../../../../src/ol/Feature.js';
import Map from '../../../../src/ol/Map.js';
import MapBrowserPointerEvent from '../../../../src/ol/MapBrowserPointerEvent.js';
import _ol_View_ from '../../../../src/ol/View.js';
@@ -1035,7 +1035,7 @@ describe('ol.interaction.Draw', function() {
type: 'LineString'
});
map.addInteraction(draw);
feature = new _ol_Feature_(
feature = new Feature(
new LineString([[0, 0], [1, 1], [2, 0]]));
});
+11 -11
View File
@@ -1,5 +1,5 @@
import _ol_Collection_ from '../../../../src/ol/Collection.js';
import _ol_Feature_ from '../../../../src/ol/Feature.js';
import Feature from '../../../../src/ol/Feature.js';
import Map from '../../../../src/ol/Map.js';
import MapBrowserPointerEvent from '../../../../src/ol/MapBrowserPointerEvent.js';
import _ol_View_ from '../../../../src/ol/View.js';
@@ -34,7 +34,7 @@ describe('ol.interaction.Modify', function() {
document.body.appendChild(target);
features = [
new _ol_Feature_({
new Feature({
geometry: new Polygon([
[[0, 0], [10, 20], [0, 40], [40, 40], [40, 0]]
])
@@ -151,7 +151,7 @@ describe('ol.interaction.Modify', function() {
describe('constructor', function() {
it('adds features to the RTree', function() {
var feature = new _ol_Feature_(
var feature = new Feature(
new Point([0, 0]));
var features = new _ol_Collection_([feature]);
var modify = new _ol_interaction_Modify_({
@@ -163,7 +163,7 @@ describe('ol.interaction.Modify', function() {
});
it('accepts feature without geometry', function() {
var feature = new _ol_Feature_();
var feature = new Feature();
var features = new _ol_Collection_([feature]);
var modify = new _ol_interaction_Modify_({
features: features
@@ -178,7 +178,7 @@ describe('ol.interaction.Modify', function() {
});
it('accepts a source', function() {
var feature = new _ol_Feature_(
var feature = new Feature(
new Point([0, 0]));
var source = new _ol_source_Vector_({features: [feature]});
var modify = new _ol_interaction_Modify_({source: source});
@@ -225,7 +225,7 @@ describe('ol.interaction.Modify', function() {
});
it('deletes first vertex of a LineString', function() {
var lineFeature = new _ol_Feature_({
var lineFeature = new Feature({
geometry: new LineString(
[[0, 0], [10, 20], [0, 40], [40, 40], [40, 0]]
)
@@ -261,7 +261,7 @@ describe('ol.interaction.Modify', function() {
});
it('deletes last vertex of a LineString', function() {
var lineFeature = new _ol_Feature_({
var lineFeature = new Feature({
geometry: new LineString(
[[0, 0], [10, 20], [0, 40], [40, 40], [40, 0]]
)
@@ -297,7 +297,7 @@ describe('ol.interaction.Modify', function() {
});
it('deletes vertex of a LineString programmatically', function() {
var lineFeature = new _ol_Feature_({
var lineFeature = new Feature({
geometry: new LineString(
[[0, 0], [10, 20], [0, 40], [40, 40], [40, 0]]
)
@@ -339,7 +339,7 @@ describe('ol.interaction.Modify', function() {
describe('vertex modification', function() {
it('keeps the third dimension', function() {
var lineFeature = new _ol_Feature_({
var lineFeature = new Feature({
geometry: new LineString(
[[0, 0, 10], [10, 20, 20], [0, 40, 30], [40, 40, 40], [40, 0, 50]]
)
@@ -382,7 +382,7 @@ describe('ol.interaction.Modify', function() {
describe('circle modification', function() {
it('changes the circle radius and center', function() {
var circleFeature = new _ol_Feature_(new Circle([10, 10], 20));
var circleFeature = new Feature(new Circle([10, 10], 20));
features.length = 0;
features.push(circleFeature);
@@ -617,7 +617,7 @@ describe('ol.interaction.Modify', function() {
});
it('updates circle segment data', function() {
var feature = new _ol_Feature_(new Circle([10, 10], 20));
var feature = new Feature(new Circle([10, 10], 20));
features.length = 0;
features.push(feature);
+6 -6
View File
@@ -1,5 +1,5 @@
import _ol_Collection_ from '../../../../src/ol/Collection.js';
import _ol_Feature_ from '../../../../src/ol/Feature.js';
import Feature from '../../../../src/ol/Feature.js';
import Map from '../../../../src/ol/Map.js';
import MapBrowserEventType from '../../../../src/ol/MapBrowserEventType.js';
import MapBrowserPointerEvent from '../../../../src/ol/MapBrowserPointerEvent.js';
@@ -36,19 +36,19 @@ describe('ol.interaction.Select', function() {
// -> foo -> bar.
var features = [];
features.push(
new _ol_Feature_({
new Feature({
geometry: geometry,
type: 'bar'
}),
new _ol_Feature_({
new Feature({
geometry: geometry,
type: 'foo'
}),
new _ol_Feature_({
new Feature({
geometry: geometry,
type: 'bar'
}),
new _ol_Feature_({
new Feature({
geometry: geometry,
type: 'foo'
}));
@@ -356,7 +356,7 @@ describe('ol.interaction.Select', function() {
var feature = e.selected[0];
var layer_ = interaction.getLayer(feature);
expect(e.selected).to.have.length(1);
expect(feature).to.be.a(_ol_Feature_);
expect(feature).to.be.a(Feature);
expect(layer_).to.be.a(_ol_layer_Vector_);
expect(layer_).to.equal(layer);
});
+8 -8
View File
@@ -1,5 +1,5 @@
import _ol_Collection_ from '../../../../src/ol/Collection.js';
import _ol_Feature_ from '../../../../src/ol/Feature.js';
import Feature from '../../../../src/ol/Feature.js';
import Map from '../../../../src/ol/Map.js';
import _ol_View_ from '../../../../src/ol/View.js';
import Circle from '../../../../src/ol/geom/Circle.js';
@@ -56,7 +56,7 @@ describe('ol.interaction.Snap', function() {
});
it('can handle XYZ coordinates', function() {
var point = new _ol_Feature_(new Point([0, 0, 123]));
var point = new Feature(new Point([0, 0, 123]));
var snapInteraction = new _ol_interaction_Snap_({
features: new _ol_Collection_([point])
});
@@ -73,7 +73,7 @@ describe('ol.interaction.Snap', function() {
});
it('snaps to edges only', function() {
var point = new _ol_Feature_(new LineString([[-10, 0], [10, 0]]));
var point = new 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 LineString([[-10, 0], [10, 0]]));
var point = new Feature(new LineString([[-10, 0], [10, 0]]));
var snapInteraction = new _ol_interaction_Snap_({
features: new _ol_Collection_([point]),
pixelTolerance: 5,
@@ -109,7 +109,7 @@ describe('ol.interaction.Snap', function() {
});
it('snaps to circle', function() {
var circle = new _ol_Feature_(new Circle([0, 0], 10));
var circle = new Feature(new Circle([0, 0], 10));
var snapInteraction = new _ol_interaction_Snap_({
features: new _ol_Collection_([circle]),
pixelTolerance: 5
@@ -128,7 +128,7 @@ describe('ol.interaction.Snap', function() {
});
it('handle feature without geometry', function() {
var feature = new _ol_Feature_();
var feature = new Feature();
var snapInteraction = new _ol_interaction_Snap_({
features: new _ol_Collection_([feature]),
pixelTolerance: 5,
@@ -148,7 +148,7 @@ describe('ol.interaction.Snap', function() {
});
it('handle geometry changes', function() {
var line = new _ol_Feature_(new LineString([[-10, 0], [0, 0]]));
var line = new Feature(new LineString([[-10, 0], [0, 0]]));
var snapInteraction = new _ol_interaction_Snap_({
features: new _ol_Collection_([line]),
pixelTolerance: 5,
@@ -168,7 +168,7 @@ describe('ol.interaction.Snap', function() {
});
it('handle geometry name changes', function() {
var line = new _ol_Feature_({
var line = new Feature({
geometry: new LineString([[-10, 0], [0, 0]]),
alt_geometry: new LineString([[-10, 0], [10, 0]])
});
+3 -3
View File
@@ -1,5 +1,5 @@
import _ol_Collection_ from '../../../../src/ol/Collection.js';
import _ol_Feature_ from '../../../../src/ol/Feature.js';
import Feature from '../../../../src/ol/Feature.js';
import Map from '../../../../src/ol/Map.js';
import MapBrowserPointerEvent from '../../../../src/ol/MapBrowserPointerEvent.js';
import _ol_View_ from '../../../../src/ol/View.js';
@@ -27,9 +27,9 @@ describe('ol.interaction.Translate', function() {
style.height = height + 'px';
document.body.appendChild(target);
source = new _ol_source_Vector_();
features = [new _ol_Feature_({
features = [new Feature({
geometry: new Point([10, -20])
}), new _ol_Feature_({
}), new Feature({
geometry: new Point([20, -30])
})];
source.addFeatures(features);