handlers have to check if layer exists before destroying it. Thanks pgiraud. (closes #1107)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5085 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -43,6 +43,21 @@
|
||||
"deactivate returns true if the handler was active already");
|
||||
}
|
||||
|
||||
function test_Handler_Point_deactivation(t) {
|
||||
t.plan(1);
|
||||
var map = new OpenLayers.Map('map');
|
||||
var control = new OpenLayers.Control();
|
||||
map.addControl(control);
|
||||
|
||||
var handler = new OpenLayers.Handler.Point(control, {foo: 'bar'});
|
||||
handler.activate();
|
||||
handler.layer.destroy();
|
||||
handler.deactivate();
|
||||
t.eq(handler.layer, null,
|
||||
"deactivate doesn't throw an error if layer was" +
|
||||
" previously destroyed");
|
||||
}
|
||||
|
||||
function test_Handler_Point_bounds(t) {
|
||||
t.plan(4);
|
||||
var map = new OpenLayers.Map('map');
|
||||
|
||||
Reference in New Issue
Block a user