mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-23 11:42:21 +00:00
fix(recent-imagery): address dateline review (halves availability, voice guard, export, renderer fallback)
This commit is contained in:
1 parent
9a34d63f1d
commit
d60f2420f4
9 files changed
+209
-54
No files matched your search
@@ -148,8 +148,9 @@ export function createRecentImageryRenderer({
|
||||
}
|
||||
|
||||
function mount(slotId, { candidate, box, alpha, split }) {
|
||||
const rectangles = nonCrossingBoxes(box);
|
||||
const parts = rectangles.length ? rectangles : [box];
|
||||
// [] means "not a box": add no layer rather than drape the raw box.
|
||||
const parts = nonCrossingBoxes(box);
|
||||
if (!parts.length) return false;
|
||||
// Build every provider before adding any layer, so a throw on the second
|
||||
// half of a dateline box cannot leave the first layer untracked.
|
||||
const providers = parts.map((part) => createProvider(candidate, part));
|
||||
@@ -176,6 +177,7 @@ export function createRecentImageryRenderer({
|
||||
split,
|
||||
};
|
||||
applyLook(owned[slotId]);
|
||||
return true;
|
||||
}
|
||||
|
||||
return {
|
||||
@@ -215,7 +217,7 @@ export function createRecentImageryRenderer({
|
||||
return true;
|
||||
}
|
||||
removeOwned(slotId);
|
||||
mount(slotId, { candidate, box, ...look });
|
||||
if (!mount(slotId, { candidate, box, ...look })) return false;
|
||||
requestRender('recent-imagery-show');
|
||||
return true;
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user