[fix](trx-frontend-http): hold the strips' place above the spectrum
Tuning across a band edge moved the whole page under the cursor: the band plan strip is in flow, so a range with no allocations collapsed it from 18px to nothing and dragged every element below it up (measured at 1600x950: overview top 118 to 100, footer 1026 to 1008). It now keeps its height whenever a band plan could be drawn at all, and only gives it back when the feature is off, has no data, or there is no spectrum. The bookmark rail gets the same treatment for consistency, though it never moved anything — it is absolutely positioned over the top of the overview. It stays up and blank rather than vanishing. Which exposes something the rail was already doing wrong: it covers the top of the plot, and a bare div still takes pointer events, so whenever bookmarks were in range that band of the overview could not be dragged or scrolled. Only the chips are targets now. tests/spectrum-layout.mjs covers this: it streams spectrum frames, tunes between a band with bookmarks and allocations and one with neither, and asserts nothing moves and that the rail lets clicks through. Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"typecheck": "tsc --project tsconfig.json && tsc --project tsconfig.worker.json",
|
||||
"lint": "eslint \"src/**/*.ts\" \"tests/**/*.mjs\" build.mjs --no-error-on-unmatched-pattern",
|
||||
"test": "node --test tests/*.test.mjs",
|
||||
"test:browser": "node tests/browser-smoke.mjs",
|
||||
"test:browser": "node tests/browser-smoke.mjs && node tests/spectrum-layout.mjs",
|
||||
"verify-generated": "npm run generate-types && npm run build && git diff --exit-code -- ../assets/web/generated src/api/generated.ts"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
Reference in New Issue
Block a user