mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-23 11:42:21 +00:00
Merge main into byrdit/recent-imagery-dateline
Resolve the Recent Imagery conflicts on main's renderer ports: dateline slots drape up to two globe-port layers, the drag preview draws a box across ±180°.
This commit is contained in:
commit
5555aba82c
2619 files changed
+259411
-57489
No files matched your search
+5
-11
@@ -17,7 +17,7 @@ import {
|
||||
tn,
|
||||
translateKnown,
|
||||
} from '../i18n/index.js';
|
||||
import { createImagerySplit } from './imagerySplit.js';
|
||||
import { createImagerySplit, globeSplitTarget } from './imagerySplit.js';
|
||||
import RecentImageryReadout from './recentImagery/RecentImageryReadout.vue';
|
||||
import {
|
||||
PRODUCTS,
|
||||
@@ -27,7 +27,7 @@ import {
|
||||
} from '../layers/recentImagery/model.js';
|
||||
import { displayDay, displayMetres } from '../layers/recentImagery/display.js';
|
||||
import { formatQuantity } from './unitLabels.js';
|
||||
import { pointerOwnerName } from '../data/pointerOwnerNames.js';
|
||||
import { canvasOf, findFrame, findGlobe } from '../render/rendererOf.js';
|
||||
|
||||
const PANEL_ID = 'recent-imagery-panel';
|
||||
const OVERVIEW_MIN_BOX_KM = 25;
|
||||
@@ -50,7 +50,6 @@ const LAYER_NOTICES = new Set([
|
||||
// imageryBoxTool.js); fixed refusals there are msg() text for translateKnown.
|
||||
const TOO_LARGE = /^(Box|View) is ([\d,]+) km wide · limit ([\d,]+) km$/;
|
||||
const POLAR = /^Imagery stops at ±([\d.]+)° latitude$/;
|
||||
const POINTER_BUSY = /^(.+) is using the pointer — close it first$/;
|
||||
|
||||
/**
|
||||
* The notice line in the UI language: notices and box refusals arrive in
|
||||
@@ -69,11 +68,6 @@ export function localizeNotice(text) {
|
||||
maximumFractionDigits: 2,
|
||||
}),
|
||||
});
|
||||
const busy = POINTER_BUSY.exec(text);
|
||||
if (busy)
|
||||
return t('{owner} is using the pointer — close it first', {
|
||||
owner: translateKnown(pointerOwnerName(busy[1])),
|
||||
});
|
||||
const tooLarge = TOO_LARGE.exec(text);
|
||||
if (!tooLarge) return translateKnown(text);
|
||||
const values = {
|
||||
@@ -217,7 +211,7 @@ export function createRecentImageryPanel({
|
||||
fetchImpl = globalThis.fetch?.bind(globalThis),
|
||||
createObjectUrl = (blob) => URL.createObjectURL(blob),
|
||||
revokeObjectUrl = (url) => URL.revokeObjectURL(url),
|
||||
requestRender = () => viewer?.scene?.requestRender?.(),
|
||||
requestRender = () => findFrame(viewer)?.requestRender('recent-imagery'),
|
||||
} = {}) {
|
||||
const document = container?.ownerDocument;
|
||||
if (!document?.createElement || !layer) return null;
|
||||
@@ -721,7 +715,7 @@ export function createRecentImageryPanel({
|
||||
}
|
||||
if (!live || split || destroyed) return;
|
||||
split = createSplit({
|
||||
scene: viewer?.scene,
|
||||
scene: globeSplitTarget(findGlobe(viewer)),
|
||||
initialValue: snapshot.split,
|
||||
id: 'recent-imagery-split-line',
|
||||
handleClass: 'recent-imagery-split-handle',
|
||||
@@ -742,7 +736,7 @@ export function createRecentImageryPanel({
|
||||
right: rightPercent,
|
||||
}),
|
||||
getViewportWidth: () =>
|
||||
Number(viewer?.scene?.canvas?.clientWidth) ||
|
||||
Number(canvasOf(viewer)?.clientWidth) ||
|
||||
Number(document.documentElement?.clientWidth) ||
|
||||
0,
|
||||
onChange: (value) => layer.setSplit(value),
|
||||
|
||||
Reference in new issue
Block a user