Rename _ol_Collection_ to Collection
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @module ol/interaction/Modify
|
||||
*/
|
||||
import {getUid, inherits} from '../index.js';
|
||||
import _ol_Collection_ from '../Collection.js';
|
||||
import Collection from '../Collection.js';
|
||||
import CollectionEventType from '../CollectionEventType.js';
|
||||
import Feature from '../Feature.js';
|
||||
import MapBrowserEventType from '../MapBrowserEventType.js';
|
||||
@@ -195,7 +195,7 @@ var _ol_interaction_Modify_ = function(options) {
|
||||
var features;
|
||||
if (options.source) {
|
||||
this.source_ = options.source;
|
||||
features = new _ol_Collection_(this.source_.getFeatures());
|
||||
features = new Collection(this.source_.getFeatures());
|
||||
_ol_events_.listen(this.source_, VectorEventType.ADDFEATURE,
|
||||
this.handleSourceAdd_, this);
|
||||
_ol_events_.listen(this.source_, VectorEventType.REMOVEFEATURE,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @module ol/interaction/Snap
|
||||
*/
|
||||
import {getUid, inherits} from '../index.js';
|
||||
import _ol_Collection_ from '../Collection.js';
|
||||
import Collection from '../Collection.js';
|
||||
import CollectionEventType from '../CollectionEventType.js';
|
||||
import _ol_coordinate_ from '../coordinate.js';
|
||||
import _ol_events_ from '../events.js';
|
||||
@@ -221,7 +221,7 @@ _ol_interaction_Snap_.prototype.handleFeatureAdd_ = function(evt) {
|
||||
var feature;
|
||||
if (evt instanceof VectorSource.Event) {
|
||||
feature = evt.feature;
|
||||
} else if (evt instanceof _ol_Collection_.Event) {
|
||||
} else if (evt instanceof Collection.Event) {
|
||||
feature = evt.element;
|
||||
}
|
||||
this.addFeature(/** @type {ol.Feature} */ (feature));
|
||||
@@ -236,7 +236,7 @@ _ol_interaction_Snap_.prototype.handleFeatureRemove_ = function(evt) {
|
||||
var feature;
|
||||
if (evt instanceof VectorSource.Event) {
|
||||
feature = evt.feature;
|
||||
} else if (evt instanceof _ol_Collection_.Event) {
|
||||
} else if (evt instanceof Collection.Event) {
|
||||
feature = evt.element;
|
||||
}
|
||||
this.removeFeature(/** @type {ol.Feature} */ (feature));
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @module ol/interaction/Translate
|
||||
*/
|
||||
import {inherits} from '../index.js';
|
||||
import _ol_Collection_ from '../Collection.js';
|
||||
import Collection from '../Collection.js';
|
||||
import BaseObject from '../Object.js';
|
||||
import _ol_events_ from '../events.js';
|
||||
import Event from '../events/Event.js';
|
||||
@@ -100,7 +100,7 @@ _ol_interaction_Translate_.handleDownEvent_ = function(event) {
|
||||
this.lastCoordinate_ = event.coordinate;
|
||||
_ol_interaction_Translate_.handleMoveEvent_.call(this, event);
|
||||
|
||||
var features = this.features_ || new _ol_Collection_([this.lastFeature_]);
|
||||
var features = this.features_ || new Collection([this.lastFeature_]);
|
||||
|
||||
this.dispatchEvent(
|
||||
new _ol_interaction_Translate_.Event(
|
||||
@@ -123,7 +123,7 @@ _ol_interaction_Translate_.handleUpEvent_ = function(event) {
|
||||
this.lastCoordinate_ = null;
|
||||
_ol_interaction_Translate_.handleMoveEvent_.call(this, event);
|
||||
|
||||
var features = this.features_ || new _ol_Collection_([this.lastFeature_]);
|
||||
var features = this.features_ || new Collection([this.lastFeature_]);
|
||||
|
||||
this.dispatchEvent(
|
||||
new _ol_interaction_Translate_.Event(
|
||||
@@ -146,7 +146,7 @@ _ol_interaction_Translate_.handleDragEvent_ = function(event) {
|
||||
var deltaX = newCoordinate[0] - this.lastCoordinate_[0];
|
||||
var deltaY = newCoordinate[1] - this.lastCoordinate_[1];
|
||||
|
||||
var features = this.features_ || new _ol_Collection_([this.lastFeature_]);
|
||||
var features = this.features_ || new Collection([this.lastFeature_]);
|
||||
|
||||
features.forEach(function(feature) {
|
||||
var geom = feature.getGeometry();
|
||||
|
||||
Reference in New Issue
Block a user