mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 02:44:02 +00:00
keep the phone credit line on screen
On phones the credit line kept white-space: nowrap, so map plus outline credits ran past the right edge and cut off the Data attribution link. Cesium's credit block is absolutely positioned inside #cesium-credits, so the box needs a real width for the credits to wrap: give it the screen width divided by its 0.8 scale, overriding the dock's width: auto !important the way the phone offset already does. Desktop keeps its one-line rule.
This commit is contained in:
1 parent
38226ac33d
commit
c61ddb38c2
3 files changed
+22
-1
No files matched your search
@@ -499,6 +499,16 @@ test('the phone shell keeps the required attribution visible', () => {
|
||||
idleCredit,
|
||||
/display:\s*none|visibility:\s*hidden|opacity:\s*0/,
|
||||
);
|
||||
// A long credit line (map plus outline credits) wraps inside the screen:
|
||||
// the box needs a real width for Cesium's absolutely positioned credit
|
||||
// block, set before the 0.8 scale, so it is divided by it.
|
||||
assert.match(idleCredit, /white-space: normal;/);
|
||||
assert.match(
|
||||
idleCredit,
|
||||
/[^-]width: calc\(\(100vw - 20px\) \/ 0\.8\) !important;/,
|
||||
);
|
||||
assert.match(idleCredit, /max-width: none !important;/);
|
||||
assert.match(idleCredit, /scale: 0\.8;/);
|
||||
// Open sheet: above everything the sheet covers, drawn above the sheets.
|
||||
const sheetCredit = rule(
|
||||
'body.mobile-shell[data-mobile-sheet]:not(.recording-mode):not(.cockpit-mode):not(.ui-clean-view) #cesium-credits',
|
||||
|
||||
Reference in new issue
Block a user