Rename _ol_interaction_Modify_ to Modify
This commit is contained in:
@@ -9,7 +9,7 @@ import Circle from '../../../../src/ol/geom/Circle.js';
|
||||
import LineString from '../../../../src/ol/geom/LineString.js';
|
||||
import Point from '../../../../src/ol/geom/Point.js';
|
||||
import Polygon from '../../../../src/ol/geom/Polygon.js';
|
||||
import _ol_interaction_Modify_ from '../../../../src/ol/interaction/Modify.js';
|
||||
import Modify from '../../../../src/ol/interaction/Modify.js';
|
||||
import VectorLayer from '../../../../src/ol/layer/Vector.js';
|
||||
import _ol_pointer_PointerEvent_ from '../../../../src/ol/pointer/PointerEvent.js';
|
||||
import VectorSource from '../../../../src/ol/source/Vector.js';
|
||||
@@ -130,11 +130,11 @@ describe('ol.interaction.Modify', function() {
|
||||
var endevent = events[events.length - 1];
|
||||
|
||||
// first event should be modifystary
|
||||
expect(startevent).to.be.an(_ol_interaction_Modify_.Event);
|
||||
expect(startevent).to.be.an(Modify.Event);
|
||||
expect(startevent.type).to.eql('modifystart');
|
||||
|
||||
// last event should be modifyend
|
||||
expect(endevent).to.be.an(_ol_interaction_Modify_.Event);
|
||||
expect(endevent).to.be.an(Modify.Event);
|
||||
expect(endevent.type).to.eql('modifyend');
|
||||
|
||||
// make sure we get change events to events array
|
||||
@@ -154,7 +154,7 @@ describe('ol.interaction.Modify', function() {
|
||||
var feature = new Feature(
|
||||
new Point([0, 0]));
|
||||
var features = new Collection([feature]);
|
||||
var modify = new _ol_interaction_Modify_({
|
||||
var modify = new Modify({
|
||||
features: features
|
||||
});
|
||||
var rbushEntries = modify.rBush_.getAll();
|
||||
@@ -165,7 +165,7 @@ describe('ol.interaction.Modify', function() {
|
||||
it('accepts feature without geometry', function() {
|
||||
var feature = new Feature();
|
||||
var features = new Collection([feature]);
|
||||
var modify = new _ol_interaction_Modify_({
|
||||
var modify = new Modify({
|
||||
features: features
|
||||
});
|
||||
var rbushEntries = modify.rBush_.getAll();
|
||||
@@ -181,7 +181,7 @@ describe('ol.interaction.Modify', function() {
|
||||
var feature = new Feature(
|
||||
new Point([0, 0]));
|
||||
var source = new VectorSource({features: [feature]});
|
||||
var modify = new _ol_interaction_Modify_({source: source});
|
||||
var modify = new Modify({source: source});
|
||||
var rbushEntries = modify.rBush_.getAll();
|
||||
expect(rbushEntries.length).to.be(1);
|
||||
expect(rbushEntries[0].feature).to.be(feature);
|
||||
@@ -199,7 +199,7 @@ describe('ol.interaction.Modify', function() {
|
||||
var second = features[1];
|
||||
var secondRevision = second.getGeometry().getRevision();
|
||||
|
||||
var modify = new _ol_interaction_Modify_({
|
||||
var modify = new Modify({
|
||||
features: new Collection(features)
|
||||
});
|
||||
map.addInteraction(modify);
|
||||
@@ -237,7 +237,7 @@ describe('ol.interaction.Modify', function() {
|
||||
var first = features[0];
|
||||
var firstRevision = first.getGeometry().getRevision();
|
||||
|
||||
var modify = new _ol_interaction_Modify_({
|
||||
var modify = new Modify({
|
||||
features: new Collection(features)
|
||||
});
|
||||
map.addInteraction(modify);
|
||||
@@ -273,7 +273,7 @@ describe('ol.interaction.Modify', function() {
|
||||
var first = features[0];
|
||||
var firstRevision = first.getGeometry().getRevision();
|
||||
|
||||
var modify = new _ol_interaction_Modify_({
|
||||
var modify = new Modify({
|
||||
features: new Collection(features)
|
||||
});
|
||||
map.addInteraction(modify);
|
||||
@@ -309,7 +309,7 @@ describe('ol.interaction.Modify', function() {
|
||||
var first = features[0];
|
||||
var firstRevision = first.getGeometry().getRevision();
|
||||
|
||||
var modify = new _ol_interaction_Modify_({
|
||||
var modify = new Modify({
|
||||
features: new Collection(features)
|
||||
});
|
||||
map.addInteraction(modify);
|
||||
@@ -347,7 +347,7 @@ describe('ol.interaction.Modify', function() {
|
||||
features.length = 0;
|
||||
features.push(lineFeature);
|
||||
|
||||
var modify = new _ol_interaction_Modify_({
|
||||
var modify = new Modify({
|
||||
features: new Collection(features)
|
||||
});
|
||||
map.addInteraction(modify);
|
||||
@@ -386,7 +386,7 @@ describe('ol.interaction.Modify', function() {
|
||||
features.length = 0;
|
||||
features.push(circleFeature);
|
||||
|
||||
var modify = new _ol_interaction_Modify_({
|
||||
var modify = new Modify({
|
||||
features: new Collection(features)
|
||||
});
|
||||
map.addInteraction(modify);
|
||||
@@ -417,7 +417,7 @@ describe('ol.interaction.Modify', function() {
|
||||
var modify, feature, events;
|
||||
|
||||
beforeEach(function() {
|
||||
modify = new _ol_interaction_Modify_({
|
||||
modify = new Modify({
|
||||
features: new Collection(features)
|
||||
});
|
||||
map.addInteraction(modify);
|
||||
@@ -522,7 +522,7 @@ describe('ol.interaction.Modify', function() {
|
||||
var modify, feature, events;
|
||||
|
||||
beforeEach(function() {
|
||||
modify = new _ol_interaction_Modify_({
|
||||
modify = new Modify({
|
||||
features: new Collection(features),
|
||||
deleteCondition: _ol_events_condition_.doubleClick
|
||||
});
|
||||
@@ -575,7 +575,7 @@ describe('ol.interaction.Modify', function() {
|
||||
return false;
|
||||
});
|
||||
|
||||
var modify = new _ol_interaction_Modify_({
|
||||
var modify = new Modify({
|
||||
features: new Collection(features),
|
||||
insertVertexCondition: listenerSpy
|
||||
});
|
||||
@@ -621,7 +621,7 @@ describe('ol.interaction.Modify', function() {
|
||||
features.length = 0;
|
||||
features.push(feature);
|
||||
|
||||
var modify = new _ol_interaction_Modify_({
|
||||
var modify = new Modify({
|
||||
features: new Collection(features)
|
||||
});
|
||||
map.addInteraction(modify);
|
||||
@@ -657,7 +657,7 @@ describe('ol.interaction.Modify', function() {
|
||||
});
|
||||
|
||||
it('updates polygon segment data', function() {
|
||||
var modify = new _ol_interaction_Modify_({
|
||||
var modify = new Modify({
|
||||
features: new Collection(features)
|
||||
});
|
||||
map.addInteraction(modify);
|
||||
@@ -697,7 +697,7 @@ describe('ol.interaction.Modify', function() {
|
||||
|
||||
describe('#setActive', function() {
|
||||
it('removes the vertexFeature of deactivation', function() {
|
||||
var modify = new _ol_interaction_Modify_({
|
||||
var modify = new Modify({
|
||||
features: new Collection(features)
|
||||
});
|
||||
map.addInteraction(modify);
|
||||
|
||||
Reference in New Issue
Block a user