From 1e307c16acfae446344df515174401ca9a3c8675 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Tue, 19 Dec 2017 08:42:32 +0100 Subject: [PATCH] Rename _ol_source_VectorEventType_ to VectorEventType --- src/ol/interaction/Modify.js | 6 +++--- src/ol/interaction/Snap.js | 6 +++--- src/ol/source/Vector.js | 16 ++++++++-------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/ol/interaction/Modify.js b/src/ol/interaction/Modify.js index e9d33737e5..397ff20af6 100644 --- a/src/ol/interaction/Modify.js +++ b/src/ol/interaction/Modify.js @@ -20,7 +20,7 @@ import _ol_interaction_ModifyEventType_ from '../interaction/ModifyEventType.js' import _ol_interaction_Pointer_ from '../interaction/Pointer.js'; import _ol_layer_Vector_ from '../layer/Vector.js'; import _ol_source_Vector_ from '../source/Vector.js'; -import _ol_source_VectorEventType_ from '../source/VectorEventType.js'; +import VectorEventType from '../source/VectorEventType.js'; import RBush from '../structs/RBush.js'; import _ol_style_Style_ from '../style/Style.js'; @@ -196,9 +196,9 @@ var _ol_interaction_Modify_ = function(options) { if (options.source) { this.source_ = options.source; features = new _ol_Collection_(this.source_.getFeatures()); - _ol_events_.listen(this.source_, _ol_source_VectorEventType_.ADDFEATURE, + _ol_events_.listen(this.source_, VectorEventType.ADDFEATURE, this.handleSourceAdd_, this); - _ol_events_.listen(this.source_, _ol_source_VectorEventType_.REMOVEFEATURE, + _ol_events_.listen(this.source_, VectorEventType.REMOVEFEATURE, this.handleSourceRemove_, this); } else { features = options.features; diff --git a/src/ol/interaction/Snap.js b/src/ol/interaction/Snap.js index eec5ca78a5..cf5845699e 100644 --- a/src/ol/interaction/Snap.js +++ b/src/ol/interaction/Snap.js @@ -14,7 +14,7 @@ import Polygon from '../geom/Polygon.js'; import _ol_interaction_Pointer_ from '../interaction/Pointer.js'; import _ol_obj_ from '../obj.js'; import _ol_source_Vector_ from '../source/Vector.js'; -import _ol_source_VectorEventType_ from '../source/VectorEventType.js'; +import VectorEventType from '../source/VectorEventType.js'; import RBush from '../structs/RBush.js'; /** @@ -316,9 +316,9 @@ _ol_interaction_Snap_.prototype.setMap = function(map) { ); } else if (this.source_) { keys.push( - _ol_events_.listen(this.source_, _ol_source_VectorEventType_.ADDFEATURE, + _ol_events_.listen(this.source_, VectorEventType.ADDFEATURE, this.handleFeatureAdd_, this), - _ol_events_.listen(this.source_, _ol_source_VectorEventType_.REMOVEFEATURE, + _ol_events_.listen(this.source_, VectorEventType.REMOVEFEATURE, this.handleFeatureRemove_, this) ); } diff --git a/src/ol/source/Vector.js b/src/ol/source/Vector.js index d4dd04cdea..306416d4f0 100644 --- a/src/ol/source/Vector.js +++ b/src/ol/source/Vector.js @@ -18,7 +18,7 @@ import _ol_loadingstrategy_ from '../loadingstrategy.js'; import _ol_obj_ from '../obj.js'; import _ol_source_Source_ from '../source/Source.js'; import SourceState from '../source/State.js'; -import _ol_source_VectorEventType_ from '../source/VectorEventType.js'; +import VectorEventType from '../source/VectorEventType.js'; import RBush from '../structs/RBush.js'; /** @@ -192,7 +192,7 @@ _ol_source_Vector_.prototype.addFeatureInternal = function(feature) { } this.dispatchEvent( - new _ol_source_Vector_.Event(_ol_source_VectorEventType_.ADDFEATURE, feature)); + new _ol_source_Vector_.Event(VectorEventType.ADDFEATURE, feature)); }; @@ -287,7 +287,7 @@ _ol_source_Vector_.prototype.addFeaturesInternal = function(features) { for (i = 0, length = newFeatures.length; i < length; i++) { this.dispatchEvent(new _ol_source_Vector_.Event( - _ol_source_VectorEventType_.ADDFEATURE, newFeatures[i])); + VectorEventType.ADDFEATURE, newFeatures[i])); } }; @@ -298,7 +298,7 @@ _ol_source_Vector_.prototype.addFeaturesInternal = function(features) { */ _ol_source_Vector_.prototype.bindFeaturesCollection_ = function(collection) { var modifyingCollection = false; - _ol_events_.listen(this, _ol_source_VectorEventType_.ADDFEATURE, + _ol_events_.listen(this, VectorEventType.ADDFEATURE, function(evt) { if (!modifyingCollection) { modifyingCollection = true; @@ -306,7 +306,7 @@ _ol_source_Vector_.prototype.bindFeaturesCollection_ = function(collection) { modifyingCollection = false; } }); - _ol_events_.listen(this, _ol_source_VectorEventType_.REMOVEFEATURE, + _ol_events_.listen(this, VectorEventType.REMOVEFEATURE, function(evt) { if (!modifyingCollection) { modifyingCollection = true; @@ -368,7 +368,7 @@ _ol_source_Vector_.prototype.clear = function(opt_fast) { this.loadedExtentsRtree_.clear(); this.nullGeometryFeatures_ = {}; - var clearEvent = new _ol_source_Vector_.Event(_ol_source_VectorEventType_.CLEAR); + var clearEvent = new _ol_source_Vector_.Event(VectorEventType.CLEAR); this.dispatchEvent(clearEvent); this.changed(); }; @@ -719,7 +719,7 @@ _ol_source_Vector_.prototype.handleFeatureChange_ = function(event) { } this.changed(); this.dispatchEvent(new _ol_source_Vector_.Event( - _ol_source_VectorEventType_.CHANGEFEATURE, feature)); + VectorEventType.CHANGEFEATURE, feature)); }; @@ -817,7 +817,7 @@ _ol_source_Vector_.prototype.removeFeatureInternal = function(feature) { delete this.undefIdIndex_[featureKey]; } this.dispatchEvent(new _ol_source_Vector_.Event( - _ol_source_VectorEventType_.REMOVEFEATURE, feature)); + VectorEventType.REMOVEFEATURE, feature)); };