Rename _ol_source_VectorEventType_ to VectorEventType
This commit is contained in:
@@ -20,7 +20,7 @@ import _ol_interaction_ModifyEventType_ from '../interaction/ModifyEventType.js'
|
|||||||
import _ol_interaction_Pointer_ from '../interaction/Pointer.js';
|
import _ol_interaction_Pointer_ from '../interaction/Pointer.js';
|
||||||
import _ol_layer_Vector_ from '../layer/Vector.js';
|
import _ol_layer_Vector_ from '../layer/Vector.js';
|
||||||
import _ol_source_Vector_ from '../source/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 RBush from '../structs/RBush.js';
|
||||||
import _ol_style_Style_ from '../style/Style.js';
|
import _ol_style_Style_ from '../style/Style.js';
|
||||||
|
|
||||||
@@ -196,9 +196,9 @@ var _ol_interaction_Modify_ = function(options) {
|
|||||||
if (options.source) {
|
if (options.source) {
|
||||||
this.source_ = options.source;
|
this.source_ = options.source;
|
||||||
features = new _ol_Collection_(this.source_.getFeatures());
|
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);
|
this.handleSourceAdd_, this);
|
||||||
_ol_events_.listen(this.source_, _ol_source_VectorEventType_.REMOVEFEATURE,
|
_ol_events_.listen(this.source_, VectorEventType.REMOVEFEATURE,
|
||||||
this.handleSourceRemove_, this);
|
this.handleSourceRemove_, this);
|
||||||
} else {
|
} else {
|
||||||
features = options.features;
|
features = options.features;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import Polygon from '../geom/Polygon.js';
|
|||||||
import _ol_interaction_Pointer_ from '../interaction/Pointer.js';
|
import _ol_interaction_Pointer_ from '../interaction/Pointer.js';
|
||||||
import _ol_obj_ from '../obj.js';
|
import _ol_obj_ from '../obj.js';
|
||||||
import _ol_source_Vector_ from '../source/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 RBush from '../structs/RBush.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -316,9 +316,9 @@ _ol_interaction_Snap_.prototype.setMap = function(map) {
|
|||||||
);
|
);
|
||||||
} else if (this.source_) {
|
} else if (this.source_) {
|
||||||
keys.push(
|
keys.push(
|
||||||
_ol_events_.listen(this.source_, _ol_source_VectorEventType_.ADDFEATURE,
|
_ol_events_.listen(this.source_, VectorEventType.ADDFEATURE,
|
||||||
this.handleFeatureAdd_, this),
|
this.handleFeatureAdd_, this),
|
||||||
_ol_events_.listen(this.source_, _ol_source_VectorEventType_.REMOVEFEATURE,
|
_ol_events_.listen(this.source_, VectorEventType.REMOVEFEATURE,
|
||||||
this.handleFeatureRemove_, this)
|
this.handleFeatureRemove_, this)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import _ol_loadingstrategy_ from '../loadingstrategy.js';
|
|||||||
import _ol_obj_ from '../obj.js';
|
import _ol_obj_ from '../obj.js';
|
||||||
import _ol_source_Source_ from '../source/Source.js';
|
import _ol_source_Source_ from '../source/Source.js';
|
||||||
import SourceState from '../source/State.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';
|
import RBush from '../structs/RBush.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -192,7 +192,7 @@ _ol_source_Vector_.prototype.addFeatureInternal = function(feature) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.dispatchEvent(
|
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++) {
|
for (i = 0, length = newFeatures.length; i < length; i++) {
|
||||||
this.dispatchEvent(new _ol_source_Vector_.Event(
|
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) {
|
_ol_source_Vector_.prototype.bindFeaturesCollection_ = function(collection) {
|
||||||
var modifyingCollection = false;
|
var modifyingCollection = false;
|
||||||
_ol_events_.listen(this, _ol_source_VectorEventType_.ADDFEATURE,
|
_ol_events_.listen(this, VectorEventType.ADDFEATURE,
|
||||||
function(evt) {
|
function(evt) {
|
||||||
if (!modifyingCollection) {
|
if (!modifyingCollection) {
|
||||||
modifyingCollection = true;
|
modifyingCollection = true;
|
||||||
@@ -306,7 +306,7 @@ _ol_source_Vector_.prototype.bindFeaturesCollection_ = function(collection) {
|
|||||||
modifyingCollection = false;
|
modifyingCollection = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
_ol_events_.listen(this, _ol_source_VectorEventType_.REMOVEFEATURE,
|
_ol_events_.listen(this, VectorEventType.REMOVEFEATURE,
|
||||||
function(evt) {
|
function(evt) {
|
||||||
if (!modifyingCollection) {
|
if (!modifyingCollection) {
|
||||||
modifyingCollection = true;
|
modifyingCollection = true;
|
||||||
@@ -368,7 +368,7 @@ _ol_source_Vector_.prototype.clear = function(opt_fast) {
|
|||||||
this.loadedExtentsRtree_.clear();
|
this.loadedExtentsRtree_.clear();
|
||||||
this.nullGeometryFeatures_ = {};
|
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.dispatchEvent(clearEvent);
|
||||||
this.changed();
|
this.changed();
|
||||||
};
|
};
|
||||||
@@ -719,7 +719,7 @@ _ol_source_Vector_.prototype.handleFeatureChange_ = function(event) {
|
|||||||
}
|
}
|
||||||
this.changed();
|
this.changed();
|
||||||
this.dispatchEvent(new _ol_source_Vector_.Event(
|
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];
|
delete this.undefIdIndex_[featureKey];
|
||||||
}
|
}
|
||||||
this.dispatchEvent(new _ol_source_Vector_.Event(
|
this.dispatchEvent(new _ol_source_Vector_.Event(
|
||||||
_ol_source_VectorEventType_.REMOVEFEATURE, feature));
|
VectorEventType.REMOVEFEATURE, feature));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user