[fix](trx-frontend-http): fix axis bookmark chip positioning after name span addition
querySelectorAll("span") was picking up the inner .spectrum-bookmark-name
spans added in the previous commit, causing chips[i] to map to the wrong
element during left-position assignment. Switch to :scope > span to
select only direct-child chip spans.
Also revert axis bar from height:auto (which breaks the CSS transition and
collapses the bar) to height:38px with overflow:visible to accommodate
two-line labels while keeping the open/close animation intact.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Stanislaw Grams <stanislawgrams@gmail.com>
This commit is contained in:
@@ -8734,7 +8734,7 @@ function updateBookmarkAxis(range) {
|
|||||||
// Always recompute horizontal positions (pan/zoom changes frac every frame).
|
// Always recompute horizontal positions (pan/zoom changes frac every frame).
|
||||||
const axisWidth = axisEl.clientWidth || 0;
|
const axisWidth = axisEl.clientWidth || 0;
|
||||||
const edgePad = 8;
|
const edgePad = 8;
|
||||||
const spans = axisEl.querySelectorAll("span");
|
const spans = axisEl.querySelectorAll(":scope > span");
|
||||||
visBookmarks.forEach((bm, i) => {
|
visBookmarks.forEach((bm, i) => {
|
||||||
const span = spans[i];
|
const span = spans[i];
|
||||||
if (!span) return;
|
if (!span) return;
|
||||||
|
|||||||
@@ -2901,8 +2901,8 @@ button:focus-visible, input:focus-visible, select:focus-visible {
|
|||||||
transition: height 80ms ease;
|
transition: height 80ms ease;
|
||||||
}
|
}
|
||||||
#spectrum-bookmark-axis.bm-axis-visible {
|
#spectrum-bookmark-axis.bm-axis-visible {
|
||||||
min-height: 26px;
|
height: 38px;
|
||||||
height: auto;
|
overflow: visible;
|
||||||
}
|
}
|
||||||
.spectrum-bookmark-chip {
|
.spectrum-bookmark-chip {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
Reference in New Issue
Block a user