modify feature control must use silent:true when removing/destroying vertices, p=me, r=crschmidt (closes #1562)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@7614 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -273,8 +273,8 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, {
|
||||
var deactivated = false;
|
||||
// the return from the controls is unimportant in this case
|
||||
if(OpenLayers.Control.prototype.deactivate.apply(this, arguments)) {
|
||||
this.layer.removeFeatures(this.vertices);
|
||||
this.layer.removeFeatures(this.virtualVertices);
|
||||
this.layer.removeFeatures(this.vertices, {silent: true});
|
||||
this.layer.removeFeatures(this.virtualVertices, {silent: true});
|
||||
this.vertices = [];
|
||||
this.dragControl.deactivate();
|
||||
if(this.feature && this.feature.geometry) {
|
||||
@@ -314,16 +314,16 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, {
|
||||
* unselected feature.
|
||||
*/
|
||||
unselectFeature: function(object) {
|
||||
this.layer.removeFeatures(this.vertices);
|
||||
this.layer.removeFeatures(this.vertices, {silent: true});
|
||||
this.vertices = [];
|
||||
this.layer.destroyFeatures(this.virtualVertices);
|
||||
this.layer.destroyFeatures(this.virtualVertices, {silent: true});
|
||||
this.virtualVertices = [];
|
||||
if(this.dragHandle) {
|
||||
this.layer.destroyFeatures([this.dragHandle]);
|
||||
this.layer.destroyFeatures([this.dragHandle], {silent: true});
|
||||
delete this.dragHandle;
|
||||
}
|
||||
if(this.radiusHandle) {
|
||||
this.layer.destroyFeatures([this.radiusHandle]);
|
||||
this.layer.destroyFeatures([this.radiusHandle], {silent: true});
|
||||
delete this.radiusHandle;
|
||||
}
|
||||
this.feature = null;
|
||||
@@ -413,17 +413,17 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, {
|
||||
this.vertices.push(vertex);
|
||||
} else if(vertex == this.dragHandle) {
|
||||
// dragging a drag handle
|
||||
this.layer.removeFeatures(this.vertices);
|
||||
this.layer.removeFeatures(this.vertices, {silent: true});
|
||||
this.vertices = [];
|
||||
if(this.radiusHandle) {
|
||||
this.layer.destroyFeatures([this.radiusHandle]);
|
||||
this.layer.destroyFeatures([this.radiusHandle], {silent: true});
|
||||
this.radiusHandle = null;
|
||||
}
|
||||
}
|
||||
// dragging a radius handle - no special treatment
|
||||
// dragging a real vertex - no special treatment
|
||||
if(this.virtualVertices.length > 0) {
|
||||
this.layer.destroyFeatures(this.virtualVertices);
|
||||
this.layer.destroyFeatures(this.virtualVertices, {silent: true});
|
||||
this.virtualVertices = [];
|
||||
}
|
||||
this.layer.drawFeature(this.feature, this.selectControl.renderIntent);
|
||||
@@ -463,19 +463,19 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, {
|
||||
this.dragControl.outFeature(this.dragControl.feature);
|
||||
}
|
||||
if(this.vertices.length > 0) {
|
||||
this.layer.removeFeatures(this.vertices);
|
||||
this.layer.removeFeatures(this.vertices, {silent: true});
|
||||
this.vertices = [];
|
||||
}
|
||||
if(this.virtualVertices.length > 0) {
|
||||
this.layer.removeFeatures(this.virtualVertices);
|
||||
this.layer.removeFeatures(this.virtualVertices, {silent: true});
|
||||
this.virtualVertices = [];
|
||||
}
|
||||
if(this.dragHandle) {
|
||||
this.layer.destroyFeatures([this.dragHandle]);
|
||||
this.layer.destroyFeatures([this.dragHandle], {silent: true});
|
||||
this.dragHandle = null;
|
||||
}
|
||||
if(this.radiusHandle) {
|
||||
this.layer.destroyFeatures([this.radiusHandle]);
|
||||
this.layer.destroyFeatures([this.radiusHandle], {silent: true});
|
||||
this.radiusHandle = null;
|
||||
}
|
||||
if(this.feature &&
|
||||
|
||||
Reference in New Issue
Block a user