Avoiding duplicate events
This commit is contained in:
committed by
Bart van den Eijnden
parent
cd5ae45273
commit
8562582dd2
@@ -235,8 +235,8 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, {
|
||||
this.handlers.drag.evt);
|
||||
if (feature) {
|
||||
this.dragStart(feature);
|
||||
} else if (this.feature && this.clickout) {
|
||||
this.unselectFeature(this.feature);
|
||||
} else if (this.clickout) {
|
||||
this._unselect = this.feature;
|
||||
}
|
||||
},
|
||||
move: function(pixel) {
|
||||
@@ -363,8 +363,9 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, {
|
||||
* feature - {<OpenLayers.Feature.Vector>} the selected feature.
|
||||
*/
|
||||
selectFeature: function(feature) {
|
||||
if (this.geometryTypes && OpenLayers.Util.indexOf(this.geometryTypes,
|
||||
feature.geometry.CLASS_NAME) == -1) {
|
||||
if ((this.modified && this.feature === feature) ||
|
||||
(this.geometryTypes && OpenLayers.Util.indexOf(this.geometryTypes,
|
||||
feature.geometry.CLASS_NAME) == -1)) {
|
||||
return;
|
||||
}
|
||||
if (this.beforeSelectFeature(feature) !== false) {
|
||||
|
||||
Reference in New Issue
Block a user