Reach the canvas through canvasOf, not the viewer

Every file that read the renderer's canvas as rendererOf(viewer)?.canvas
falling back to viewer.canvas, and the share restoration's gesture
listeners on viewer.canvas, now ask canvasOf(viewer). The 20 canvas
reach-throughs leave the viewer access record.
This commit is contained in:
Sameh Khamis committed 2026-11-10 17:18:10 -08:00
1 parent 73735b080a
commit ebbe006924
13 files changed
+30 -43

No files matched your search

+2 -2
View File
@@ -1,10 +1,10 @@
import { governorRequestRender } from './renderGovernor.js';
import {
cameraOf,
canvasOf,
findCamera,
findFrame,
findQuery,
rendererOf,
} from './render/rendererOf.js';
import {
moonPositionInertial,
@@ -585,7 +585,7 @@ export class CelestialRing {
/** The renderer's canvas; a viewer with no renderer bound, its own. */
_canvas() {
return rendererOf(this.viewer)?.canvas ?? this.viewer.canvas;
return canvasOf(this.viewer);
}
/** Whether the current camera already frames the complete globe inside the keyhole. */