Point Handler should not create feature if it is not active anymore, p=me,erilem r=ahocevar (closes #3172)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11701 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
}
|
||||
|
||||
function test_Handler_Point_activation(t) {
|
||||
t.plan(10);
|
||||
t.plan(11);
|
||||
var log = [];
|
||||
var map = new OpenLayers.Map("map", {
|
||||
resolutions: [1]
|
||||
@@ -70,7 +70,15 @@
|
||||
activated = handler.deactivate();
|
||||
t.ok(activated,
|
||||
"deactivate returns true if the handler was active already");
|
||||
|
||||
var failed = false;
|
||||
try {
|
||||
handler.finalize();
|
||||
msg = "finalizing after deactivation does not throw an error";
|
||||
} catch (err) {
|
||||
failed = true;
|
||||
msg = "finalizing after deactivation throws an error";
|
||||
}
|
||||
t.ok(!failed, msg);
|
||||
map.destroy();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user