mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Conformance: the atlas check makes its canvas slot only where a 2D context exists, not wherever there is a document
This commit is contained in:
1 parent
16c8936d70
commit
2c68fc0248
1 file changed
+3
-3
@@ -1701,12 +1701,12 @@ export function portChecks() {
|
||||
await overAustin(h, r);
|
||||
const set = r.draw.icons({ id: 'conf:atlas' });
|
||||
const at = (lon) => h.toEcef({ lon, lat: AUSTIN.lat, height: 0 });
|
||||
// A generated slot too, where there is a page to make it in.
|
||||
// A generated slot too, where there is a canvas that draws in 2D.
|
||||
const canvas = globalThis.document?.createElement('canvas');
|
||||
const g = canvas?.getContext?.('2d');
|
||||
const slots = { svg: ['dot', DOT, AUSTIN.lon - 0.002] };
|
||||
if (canvas) {
|
||||
if (g) {
|
||||
canvas.width = canvas.height = 16;
|
||||
const g = canvas.getContext('2d');
|
||||
g.fillStyle = '#fff';
|
||||
g.fillRect(0, 0, 16, 16);
|
||||
slots.canvas = [
|
||||
|
||||
Reference in new issue
Block a user