fix: release weather camera listeners while disabled

This commit is contained in:
Said committed 2026-10-20 14:01:22 +01:00
1 parent 2f23bbe87f
commit d6f89e3cfd
5 files changed
+49 -8

No files matched your search

+15
View File
@@ -2341,3 +2341,18 @@ test('a product replacement accepts supersession but never paints the obsolete f
assert.equal(h.layer.getParams().product, 'clouds');
h.layer.destroy();
});
test('disabled weather releases its camera listener and re-enabling binds only once', () => {
const h = layerHarness();
h.layer.disable();
assert.equal(h.moveEnd.size, 0, 'disabled layers own no active camera work');
h.layer.enable();
h.layer.enable();
assert.equal(h.moveEnd.size, 1);
h.layer.disable();
assert.equal(h.moveEnd.size, 0);
h.layer.enable();
assert.equal(h.moveEnd.size, 1);
h.layer.destroy();
assert.equal(h.moveEnd.size, 0);
});