Skip to content

Commit

Permalink
Fixes (#1929)
Browse files Browse the repository at this point in the history
  • Loading branch information
jokd authored Dec 8, 2023
1 parent a80dcf8 commit 9707c1d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions scss/ui/_flex.scss
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ $flex-grow-all: 2;
align-items: stretch;
}

.basis-0 {
flex-basis: 0;
}

.basis-25 {
flex-basis: 25%;
}
Expand Down
6 changes: 3 additions & 3 deletions src/controls/legend/group.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ const Group = function Group(viewer, options = {}) {
},
render() {
const padding = moreInfoButton ? '0.275rem' : '1.875rem';
return `<div class="flex row align-center padding-left text-smaller pointer collapse-header" style="width: 100%; padding-right: ${padding}">
<div id="${this.getId()}" class="flex row align-center grow">
return `<div class="flex row align-center padding-left text-smaller pointer collapse-header item wrap" style="width: 100%; padding-right: ${padding}">
<div id="${this.getId()}" class="flex row align-center grow basis-0">
${expandButton.render()}
<span class="grow padding-x-small" style="overflow-wrap: anywhere;">${title}</span>
</div>
Expand All @@ -128,7 +128,7 @@ const Group = function Group(viewer, options = {}) {

const GroupHeader = function GroupHeader() {
const headerComponent = CollapseHeader({
cls: 'hover padding-x padding-y-small grey-lightest border-bottom text-small sticky bg-white z-index-low',
cls: 'hover padding-x padding-y-small grey-lightest border-bottom text-small sticky bg-white z-index-low item wrap',
style: `top: 0;${moreInfoButton ? 'padding-right: 0.275rem' : ''}`,
icon,
title
Expand Down
4 changes: 2 additions & 2 deletions src/ui/collapseheader.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ export default function CollapseHeader(options = {}) {
icon,
iconCls: 'rotate grey',
style: {
'align-self': 'flex-end'
'align-self': 'center'
}
});

const titleCmp = Component({
render() {
return `<span id="${this.getId()}" class="grow">${title}</span>`;
return `<span id="${this.getId()}" class="grow basis-0">${title}</span>`;
}
});

Expand Down

0 comments on commit 9707c1d

Please sign in to comment.