Rename _ol_Collection_ to Collection
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import _ol_Collection_ from '../../../../src/ol/Collection.js';
|
||||
import Collection from '../../../../src/ol/Collection.js';
|
||||
import Feature from '../../../../src/ol/Feature.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import MapBrowserPointerEvent from '../../../../src/ol/MapBrowserPointerEvent.js';
|
||||
@@ -153,7 +153,7 @@ describe('ol.interaction.Modify', function() {
|
||||
it('adds features to the RTree', function() {
|
||||
var feature = new Feature(
|
||||
new Point([0, 0]));
|
||||
var features = new _ol_Collection_([feature]);
|
||||
var features = new Collection([feature]);
|
||||
var modify = new _ol_interaction_Modify_({
|
||||
features: features
|
||||
});
|
||||
@@ -164,7 +164,7 @@ describe('ol.interaction.Modify', function() {
|
||||
|
||||
it('accepts feature without geometry', function() {
|
||||
var feature = new Feature();
|
||||
var features = new _ol_Collection_([feature]);
|
||||
var features = new Collection([feature]);
|
||||
var modify = new _ol_interaction_Modify_({
|
||||
features: features
|
||||
});
|
||||
@@ -200,7 +200,7 @@ describe('ol.interaction.Modify', function() {
|
||||
var secondRevision = second.getGeometry().getRevision();
|
||||
|
||||
var modify = new _ol_interaction_Modify_({
|
||||
features: new _ol_Collection_(features)
|
||||
features: new Collection(features)
|
||||
});
|
||||
map.addInteraction(modify);
|
||||
|
||||
@@ -238,7 +238,7 @@ describe('ol.interaction.Modify', function() {
|
||||
var firstRevision = first.getGeometry().getRevision();
|
||||
|
||||
var modify = new _ol_interaction_Modify_({
|
||||
features: new _ol_Collection_(features)
|
||||
features: new Collection(features)
|
||||
});
|
||||
map.addInteraction(modify);
|
||||
|
||||
@@ -274,7 +274,7 @@ describe('ol.interaction.Modify', function() {
|
||||
var firstRevision = first.getGeometry().getRevision();
|
||||
|
||||
var modify = new _ol_interaction_Modify_({
|
||||
features: new _ol_Collection_(features)
|
||||
features: new Collection(features)
|
||||
});
|
||||
map.addInteraction(modify);
|
||||
|
||||
@@ -310,7 +310,7 @@ describe('ol.interaction.Modify', function() {
|
||||
var firstRevision = first.getGeometry().getRevision();
|
||||
|
||||
var modify = new _ol_interaction_Modify_({
|
||||
features: new _ol_Collection_(features)
|
||||
features: new Collection(features)
|
||||
});
|
||||
map.addInteraction(modify);
|
||||
|
||||
@@ -348,7 +348,7 @@ describe('ol.interaction.Modify', function() {
|
||||
features.push(lineFeature);
|
||||
|
||||
var modify = new _ol_interaction_Modify_({
|
||||
features: new _ol_Collection_(features)
|
||||
features: new Collection(features)
|
||||
});
|
||||
map.addInteraction(modify);
|
||||
|
||||
@@ -387,7 +387,7 @@ describe('ol.interaction.Modify', function() {
|
||||
features.push(circleFeature);
|
||||
|
||||
var modify = new _ol_interaction_Modify_({
|
||||
features: new _ol_Collection_(features)
|
||||
features: new Collection(features)
|
||||
});
|
||||
map.addInteraction(modify);
|
||||
|
||||
@@ -418,7 +418,7 @@ describe('ol.interaction.Modify', function() {
|
||||
|
||||
beforeEach(function() {
|
||||
modify = new _ol_interaction_Modify_({
|
||||
features: new _ol_Collection_(features)
|
||||
features: new Collection(features)
|
||||
});
|
||||
map.addInteraction(modify);
|
||||
|
||||
@@ -523,7 +523,7 @@ describe('ol.interaction.Modify', function() {
|
||||
|
||||
beforeEach(function() {
|
||||
modify = new _ol_interaction_Modify_({
|
||||
features: new _ol_Collection_(features),
|
||||
features: new Collection(features),
|
||||
deleteCondition: _ol_events_condition_.doubleClick
|
||||
});
|
||||
map.addInteraction(modify);
|
||||
@@ -576,7 +576,7 @@ describe('ol.interaction.Modify', function() {
|
||||
});
|
||||
|
||||
var modify = new _ol_interaction_Modify_({
|
||||
features: new _ol_Collection_(features),
|
||||
features: new Collection(features),
|
||||
insertVertexCondition: listenerSpy
|
||||
});
|
||||
map.addInteraction(modify);
|
||||
@@ -622,7 +622,7 @@ describe('ol.interaction.Modify', function() {
|
||||
features.push(feature);
|
||||
|
||||
var modify = new _ol_interaction_Modify_({
|
||||
features: new _ol_Collection_(features)
|
||||
features: new Collection(features)
|
||||
});
|
||||
map.addInteraction(modify);
|
||||
|
||||
@@ -658,7 +658,7 @@ describe('ol.interaction.Modify', function() {
|
||||
|
||||
it('updates polygon segment data', function() {
|
||||
var modify = new _ol_interaction_Modify_({
|
||||
features: new _ol_Collection_(features)
|
||||
features: new Collection(features)
|
||||
});
|
||||
map.addInteraction(modify);
|
||||
|
||||
@@ -698,7 +698,7 @@ describe('ol.interaction.Modify', function() {
|
||||
describe('#setActive', function() {
|
||||
it('removes the vertexFeature of deactivation', function() {
|
||||
var modify = new _ol_interaction_Modify_({
|
||||
features: new _ol_Collection_(features)
|
||||
features: new Collection(features)
|
||||
});
|
||||
map.addInteraction(modify);
|
||||
expect(modify.vertexFeature_).to.be(null);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import _ol_Collection_ from '../../../../src/ol/Collection.js';
|
||||
import Collection from '../../../../src/ol/Collection.js';
|
||||
import Feature from '../../../../src/ol/Feature.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import MapBrowserEventType from '../../../../src/ol/MapBrowserEventType.js';
|
||||
@@ -111,7 +111,7 @@ describe('ol.interaction.Select', function() {
|
||||
describe('user-provided collection', function() {
|
||||
|
||||
it('uses the user-provided collection', function() {
|
||||
var features = new _ol_Collection_();
|
||||
var features = new Collection();
|
||||
var select = new _ol_interaction_Select_({features: features});
|
||||
expect(select.getFeatures()).to.be(features);
|
||||
});
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import _ol_Collection_ from '../../../../src/ol/Collection.js';
|
||||
import Collection from '../../../../src/ol/Collection.js';
|
||||
import Feature from '../../../../src/ol/Feature.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import View from '../../../../src/ol/View.js';
|
||||
@@ -58,7 +58,7 @@ describe('ol.interaction.Snap', function() {
|
||||
it('can handle XYZ coordinates', function() {
|
||||
var point = new Feature(new Point([0, 0, 123]));
|
||||
var snapInteraction = new _ol_interaction_Snap_({
|
||||
features: new _ol_Collection_([point])
|
||||
features: new Collection([point])
|
||||
});
|
||||
snapInteraction.setMap(map);
|
||||
|
||||
@@ -75,7 +75,7 @@ describe('ol.interaction.Snap', function() {
|
||||
it('snaps to edges only', function() {
|
||||
var point = new Feature(new LineString([[-10, 0], [10, 0]]));
|
||||
var snapInteraction = new _ol_interaction_Snap_({
|
||||
features: new _ol_Collection_([point]),
|
||||
features: new Collection([point]),
|
||||
pixelTolerance: 5,
|
||||
vertex: false
|
||||
});
|
||||
@@ -93,7 +93,7 @@ describe('ol.interaction.Snap', function() {
|
||||
it('snaps to vertices only', function() {
|
||||
var point = new Feature(new LineString([[-10, 0], [10, 0]]));
|
||||
var snapInteraction = new _ol_interaction_Snap_({
|
||||
features: new _ol_Collection_([point]),
|
||||
features: new Collection([point]),
|
||||
pixelTolerance: 5,
|
||||
edge: false
|
||||
});
|
||||
@@ -111,7 +111,7 @@ describe('ol.interaction.Snap', function() {
|
||||
it('snaps to circle', function() {
|
||||
var circle = new Feature(new Circle([0, 0], 10));
|
||||
var snapInteraction = new _ol_interaction_Snap_({
|
||||
features: new _ol_Collection_([circle]),
|
||||
features: new Collection([circle]),
|
||||
pixelTolerance: 5
|
||||
});
|
||||
snapInteraction.setMap(map);
|
||||
@@ -130,7 +130,7 @@ describe('ol.interaction.Snap', function() {
|
||||
it('handle feature without geometry', function() {
|
||||
var feature = new Feature();
|
||||
var snapInteraction = new _ol_interaction_Snap_({
|
||||
features: new _ol_Collection_([feature]),
|
||||
features: new Collection([feature]),
|
||||
pixelTolerance: 5,
|
||||
edge: false
|
||||
});
|
||||
@@ -150,7 +150,7 @@ describe('ol.interaction.Snap', function() {
|
||||
it('handle geometry changes', function() {
|
||||
var line = new Feature(new LineString([[-10, 0], [0, 0]]));
|
||||
var snapInteraction = new _ol_interaction_Snap_({
|
||||
features: new _ol_Collection_([line]),
|
||||
features: new Collection([line]),
|
||||
pixelTolerance: 5,
|
||||
edge: false
|
||||
});
|
||||
@@ -173,7 +173,7 @@ describe('ol.interaction.Snap', function() {
|
||||
alt_geometry: new LineString([[-10, 0], [10, 0]])
|
||||
});
|
||||
var snapInteraction = new _ol_interaction_Snap_({
|
||||
features: new _ol_Collection_([line]),
|
||||
features: new Collection([line]),
|
||||
pixelTolerance: 5,
|
||||
edge: false
|
||||
});
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import _ol_Collection_ from '../../../../src/ol/Collection.js';
|
||||
import Collection from '../../../../src/ol/Collection.js';
|
||||
import Feature from '../../../../src/ol/Feature.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import MapBrowserPointerEvent from '../../../../src/ol/MapBrowserPointerEvent.js';
|
||||
@@ -159,7 +159,7 @@ describe('ol.interaction.Translate', function() {
|
||||
|
||||
beforeEach(function() {
|
||||
translate = new _ol_interaction_Translate_({
|
||||
features: new _ol_Collection_([features[0]])
|
||||
features: new Collection([features[0]])
|
||||
});
|
||||
map.addInteraction(translate);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user