Fixing tests
Selecting the same feature again should not do anything, which was ensured in the old implementation by a check in the SelectFeature control. This means that the previous commit causes a change in behavior in standalone mode, which I would consider a bugfix. I documented this change in the release notes.
This commit is contained in:
committed by
Bart van den Eijnden
parent
b103d3b428
commit
a5ea8d7fcf
@@ -225,6 +225,7 @@
|
||||
|
||||
// Points don't call collectVertices
|
||||
control.selectFeature(fakeFeature);
|
||||
control.unselectFeature(fakeFeature);
|
||||
|
||||
control.collectVertices = function() {
|
||||
t.ok(true, "collectVertices called");
|
||||
@@ -237,7 +238,8 @@
|
||||
layer.addFeatures = function(features) {
|
||||
t.ok(features == 'a' || features == 'd', "features passed correctly");
|
||||
}
|
||||
|
||||
layer.destroyFeatures = function() {};
|
||||
|
||||
fakeFeature.geometry = new OpenLayers.Geometry.Polygon([
|
||||
new OpenLayers.Geometry.LinearRing([
|
||||
new OpenLayers.Geometry.Point(0, 0),
|
||||
@@ -246,7 +248,9 @@
|
||||
]);
|
||||
|
||||
// OnSelect calls collectVertices and passes features to layer
|
||||
control.selectFeature(fakeFeature);
|
||||
control.selectFeature(fakeFeature);
|
||||
control.unselectFeature(fakeFeature);
|
||||
layer.destroyFeatures = OpenLayers.Layer.Vector.prototype.destroyFeatures;
|
||||
|
||||
control.vertices = ['a'];
|
||||
control.virtualVertices = [{destroy: function() {}}];
|
||||
|
||||
Reference in New Issue
Block a user