diff --git a/src/web/stylesheets/components/io/_status-bar.css b/src/web/stylesheets/components/io/_status-bar.css index 12db2b6b..050ca70f 100644 --- a/src/web/stylesheets/components/io/_status-bar.css +++ b/src/web/stylesheets/components/io/_status-bar.css @@ -14,7 +14,6 @@ font-family: var(--fixed-width-font-family); font-weight: normal; font-size: 8pt; - /*0 5px for desktop*/ margin: 5px 15px; display: flex; flex-flow: row nowrap; @@ -48,7 +47,6 @@ display: inline-block; } -/*@TODO: update this one for mobile*/ /* Dropup content (Hidden by Default) */ .cm-status-bar-select-content { display: none; @@ -57,7 +55,7 @@ right: 0; background-color: #f1f1f1; min-width: 200px; - box-shadow: 0px 4px 4px 0px rgba(0,0,0,0.2); + box-shadow: 0 4px 4px 0 rgba(0,0,0,0.2); z-index: 1; } @@ -96,11 +94,9 @@ display: block; } - -/*@TODO: and update this one for mobile*/ .cm-status-bar-select-scroll { overflow-y: auto; - max-height: 300px; + height: auto; } .chr-enc-value { @@ -113,3 +109,9 @@ } +/* Right hand side icons */ +.rhs { + position: fixed; + right: 15px; +} + diff --git a/src/web/utils/statusBar.mjs b/src/web/utils/statusBar.mjs index 81728cd9..5577c178 100644 --- a/src/web/utils/statusBar.mjs +++ b/src/web/utils/statusBar.mjs @@ -45,6 +45,7 @@ class StatusBarPanel { dom.setAttribute("data-help", `This status bar provides information about data in the ${this.label}. Help topics are available for each of the components by activating help when hovering over them.`); lhs.innerHTML = this.constructLHS(); rhs.innerHTML = this.constructRHS(); + rhs.classList.add("rhs"); dom.appendChild(lhs); dom.appendChild(rhs); @@ -288,9 +289,10 @@ class StatusBarPanel { */ updateSizing(view) { const viewHeight = view.contentDOM.parentNode.clientHeight; + this.dom.querySelectorAll(".cm-status-bar-select-scroll").forEach( el => { - el.style.maxHeight = (viewHeight - 50) + "px"; + el.style.maxHeight = window.innerWidth >= 768 ? (viewHeight - 50) + "px" : '250px'; } ); } @@ -474,7 +476,7 @@ function makePanel(opts) { sbPanel.updateSelection(update.state, update.selectionSet); sbPanel.updateTiming(); sbPanel.monitorHTMLOutput(); - if (update.geometryChanged) { + if ( update.geometryChanged) { sbPanel.updateSizing(update.view); } if (update.docChanged) {