mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-06 11:24:00 +00:00
fix(street-level): reconnect the panel once the data manager attaches, so a switch-on opens it
The panel connected before the shell had its data manager, so it never heard switch-on requests and a user switch-on left it collapsed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
09e2fd96a4
commit
36b675b928
3 files changed
+15
-1
No files matched your search
@@ -80,6 +80,7 @@ function bindings(t) {
|
||||
hud: { attachDataManager() {} },
|
||||
_contextControls: { connect() {} },
|
||||
_cctvControls: { connect() {} }, _radioControls: { connect() {} },
|
||||
_streetLevelControls: { connects: 0, connect() { this.connects += 1; } },
|
||||
};
|
||||
const owner = new LayerBindings({
|
||||
viewer: {}, services: {}, readControls: () => controls,
|
||||
@@ -97,7 +98,7 @@ function bindings(t) {
|
||||
subscribe() { events.push([id, 'subscribe']); return () => events.push([id, 'unsubscribe']); },
|
||||
};
|
||||
}
|
||||
return { owner, manager, events };
|
||||
return { owner, manager, events, controls };
|
||||
}
|
||||
|
||||
test('manager replacement releases Directions even when the new manager has no route layer', (t) => {
|
||||
@@ -116,6 +117,13 @@ test('manager replacement releases Directions even when the new manager has no r
|
||||
assert.equal(events.length, count);
|
||||
});
|
||||
|
||||
test('attaching the manager reconnects Street Level, so its switch-on requests reach the panel', (t) => {
|
||||
const { owner, manager, controls } = bindings(t);
|
||||
owner.attachDataManager(manager('first'));
|
||||
assert.equal(controls._streetLevelControls.connects, 1);
|
||||
owner.stop(); owner.disconnect();
|
||||
});
|
||||
|
||||
test('camera-entry listeners are removed before any asynchronous layer cleanup', (t) => {
|
||||
const { owner } = bindings(t);
|
||||
let changes = 0;
|
||||
|
||||
Reference in new issue
Block a user