mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 10:53:59 +00:00
refactor: isolate camera panel controls and presentation
This commit is contained in:
1 parent
bd14d6c301
commit
f45f399c31
17 files changed
+932
-657
No files matched your search
@@ -51,10 +51,10 @@ try {
|
||||
'_leftStackMutationObserver',
|
||||
'_rightStackMutationObserver',
|
||||
].filter(watchObserver);
|
||||
const cctvUnsubscribe = ui._cctvUnsubscribe;
|
||||
const cctvUnsubscribe = ui._cctvControls._cctvUnsubscribe;
|
||||
counts.cctv = 0;
|
||||
if (cctvUnsubscribe)
|
||||
ui._cctvUnsubscribe = () => {
|
||||
ui._cctvControls._cctvUnsubscribe = () => {
|
||||
counts.cctv++;
|
||||
return cctvUnsubscribe();
|
||||
};
|
||||
@@ -82,10 +82,10 @@ try {
|
||||
observersReleased: observed.every(
|
||||
(name) => counts[name] === 1 && ui[name] === null,
|
||||
),
|
||||
subscriptionReleased: counts.cctv === 1 && ui._cctvUnsubscribe === null,
|
||||
subscriptionReleased: counts.cctv === 1 && ui._cctvControls._cctvUnsubscribe === null,
|
||||
resizeReleased: counts.resize === 1 && ui._windowResizeHandler === null,
|
||||
controlsReleased:
|
||||
ui._radioControls.destroyed && ui._locationControls.destroyed,
|
||||
ui._radioControls.destroyed && ui._locationControls.destroyed && ui._cctvControls.destroyed,
|
||||
idempotent: once === JSON.stringify(counts),
|
||||
};
|
||||
} finally {
|
||||
@@ -109,7 +109,7 @@ try {
|
||||
result.resizeReleased,
|
||||
);
|
||||
check(
|
||||
'Radio and Location controls are disposed with the UI',
|
||||
'Radio, Location and CCTV controls are disposed with the UI',
|
||||
result.controlsReleased,
|
||||
);
|
||||
check('repeated UI disposal is inert', result.idempotent);
|
||||
|
||||
Reference in new issue
Block a user