mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-20 10:12:18 +00:00
Street Level photo viewer: settle opens, a gapless picker, a stated contract
Follow-ups to the photo viewer's move to a Vue view (#1868): - A panorama's open waits for a draw of the canvas counted from before it is shown, so a view that draws at once inside its listener no longer leaves the open pending; and when the last view unsubscribes, an open waiting on a draw goes on instead of hanging. - photoViewers.js supersedes the mounts not drawn on a microtask, after the winning presentation has reached every subscriber: a second subscriber sees the earlier mount, then the later one, never null between. - A presentation without a mountKey counts as the latest mount (among several without, the one that began presenting last), and one without actions or supersede is passed over without throwing. Both fields are documented on ViewerAdapter.subscribeView in registry.js and in the store's comment. - The guard test also refuses .width, .height, .ariaLabel, .id and .value writes in photoViewer.js, and .src writes outside loadImage, where only the off-page Image it creates may take one. - The test fakes draw every viewer through one shared view behind photoViewers.js's picker, as the application does, so provider and layer tests see supersede. Nothing changes in the running app. Co-authored-by: Manjunath Paparaju <[email protected]>
This commit is contained in:
1 parent
12dc0de20d
commit
33ac0545ef
9 files changed
+337
-49
No files matched your search
@@ -10,9 +10,12 @@ export const useStreetLevelPhotoStore = defineStore(
|
||||
'gev-street-level-photo',
|
||||
() => {
|
||||
/**
|
||||
* `{host, providerId, label, alt, kind, src, fit, canvasKey, dragging,
|
||||
* prevLabel, prevDisabled, nextLabel, nextDisabled, actions}`, or null
|
||||
* while no photo viewer is mounted.
|
||||
* `{host, mountKey, providerId, label, alt, kind, src, fit, canvasKey,
|
||||
* dragging, prevLabel, prevDisabled, nextLabel, nextDisabled, actions}`,
|
||||
* or null while no photo viewer is mounted. Of the viewers mounting in
|
||||
* the host, only the one mounted last (the largest `mountKey`) is
|
||||
* published; `actions.supersede()` tells the others they are not drawn
|
||||
* (see `ViewerAdapter.subscribeView` in src/layers/streetLevel/registry.js).
|
||||
*/
|
||||
const photo = shallowRef(null);
|
||||
|
||||
|
||||
Reference in new issue
Block a user