mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-18 09:12:18 +00:00
Stories: the button sits left of elements marked data-stories-corner
The corner controls are the ACTIVE STYLE readout and any element marked with data-stories-corner, looked for again for 20 s after Stories mounts, in place of an element id this app never has.
This commit is contained in:
1 parent
78b8d8dc78
commit
9e6207d7f2
4 files changed
+55
-14
No files matched your search
+16
-2
@@ -30,10 +30,24 @@ export function creditPlacement({ map, feed, width, height }) {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* The controls in GEV's top-right corner: the ACTIVE STYLE readout
|
||||
* (`#style-indicator`) and any element marked with `data-stories-corner`.
|
||||
* @param {Document|Element} root Where to look.
|
||||
* @returns {Element[]}
|
||||
*/
|
||||
export function cornerControls(root) {
|
||||
return [
|
||||
root.querySelector('#style-indicator'),
|
||||
...root.querySelectorAll('[data-stories-corner]'),
|
||||
].filter(Boolean);
|
||||
}
|
||||
|
||||
/**
|
||||
* Where the Stories button sits: just left of the leftmost visible control
|
||||
* in GEV's top-right corner — the ACTIVE STYLE readout, or an element placed
|
||||
* in that corner (with or beside the readout) — top-aligned with it.
|
||||
* in GEV's top-right corner — the ACTIVE STYLE readout, or an element marked
|
||||
* with `data-stories-corner` (with or beside the readout) — top-aligned with
|
||||
* it.
|
||||
* Where none of those shows (GEV's phone layout, whose top row of icon
|
||||
* buttons spans the corner), it goes icon-only just under the right-hand
|
||||
* column of corner actions, aligned with its right edge.
|
||||
|
||||
Reference in new issue
Block a user