mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
fix(street-level): links keep the recipient's preferences; aim under the screen centre
Review fixes for gekh's #1113 round: - a link runs show_street_level with origin 'programmatic', so its source switch and layer are not saved as the recipient's preferences; - with no place named, the action looks under the screen centre (aim 'screen-centre', armed false), keeps the sky refusal and leaves a link's armed point alone; - an armed OPEN aimed at the sky opens nothing instead of the far link point; - an imagery-stage failure is spoken as an error, missing imagery as missing (street.nearestOutcome); the card says "the view centre" in the interface language; - every photo the action opens reveals its panel, and revealPanel scrolls the panel into view in the phone sheet; - embed: EXPAND survives embed's own clean view, the lifted photo hides in cockpit, recording and scene playback, and a failed photo step closes the earlier photo before the view flies; - links pasted into an open tab run their street-level step after the restore settles; a superseded start link does not; - Mapillary's nearest search gives up after 12 s, body included.
This commit is contained in:
1 parent
3f55077c2c
commit
451f3e41cf
22 files changed
+716
-64
No files matched your search
@@ -0,0 +1,24 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import test from 'node:test';
|
||||
import { StyleManager } from './applicationShell.js';
|
||||
|
||||
test('revealing a panel opens its phone sheet and scrolls the panel into view', () => {
|
||||
const sheets = [];
|
||||
const scrolls = [];
|
||||
const panel = { scrollIntoView: (options) => scrolls.push(options) };
|
||||
const saved = globalThis.document;
|
||||
globalThis.document = {
|
||||
getElementById: (id) => (id === 'street-level-panel' ? panel : null),
|
||||
};
|
||||
try {
|
||||
StyleManager.prototype.revealPanel.call(
|
||||
{ _mobileShell: { setSheet: (sheet) => sheets.push(sheet) } },
|
||||
'street-level-panel',
|
||||
);
|
||||
} finally {
|
||||
globalThis.document = saved;
|
||||
}
|
||||
assert.deepEqual(sheets, ['cameras']);
|
||||
// The panel sits below the sheet's first screen at 375×812.
|
||||
assert.deepEqual(scrolls, [{ block: 'nearest' }]);
|
||||
});
|
||||
Reference in new issue
Block a user