Skip to content

Commit

Permalink
Add CSS to support scrolling in layers toolbar in the Cesium map view
Browse files Browse the repository at this point in the history
Set a fixed height for body element to force map view to appear on page.
Add some padding to allow for scrollbar in layers toolbar.
Fix issue with cutting off last layer in toolbar on narrow laptop
screen due to a hardcoded value for the header height.

GitHub issue: #2242

temp commit with changes for PR comments
  • Loading branch information
ianguerin committed Jan 23, 2024
1 parent 758ff8e commit ee2bed7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/css/map-view.css
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
--headerHeight: 80px;
position: relative;
height: 100%;
min-height: calc(100vh - var(--headerHeight));
min-height: 100%;
width: 100%;
display: grid;
box-sizing: border-box;
Expand Down Expand Up @@ -229,6 +229,8 @@
top: 0;
left: 0;
height: 100%;
overflow: hidden;

This comment has been minimized.

Copy link
@yvonnesjy

yvonnesjy Mar 13, 2024

Collaborator

what is this for again? looks like it broke the on-hover effect on .toolbar__link:(

This comment has been minimized.

Copy link
@ianguerin

ianguerin Mar 13, 2024

Author Collaborator

Most unfortunate. I've filed #2301

I'll have PR by eod

width: min-content;
/* required to be placed above map widget in firefox: */
z-index: 1;
}
Expand Down Expand Up @@ -395,6 +397,7 @@ represents 1 unit of the given distance measurement. */
class .toolbar, is not hidden so that the links (tabs) are still visible when the
toolbar is closed */
display: none;
overflow: hidden;
}

.toolbar--open .toolbar__all-content {
Expand All @@ -408,10 +411,12 @@ represents 1 unit of the given distance measurement. */
justify-content: center;
/* hide unless the content section is active */
display: none;
overflow: auto;
}

.toolbar__content--active {
padding-top: 1rem;
padding-right: 1rem;
display: flex;
}

Expand Down
7 changes: 7 additions & 0 deletions src/css/metacatui-common.css
Original file line number Diff line number Diff line change
Expand Up @@ -4875,6 +4875,12 @@ i.toc-sub-item {
* Portals
********************************************/

.PortalView {
height: 100%;
display: grid;
grid-template-rows: 40px 0px 100fr 0px;
}

.portal-view{
width: calc(100% + 80px);
margin-left: -40px;
Expand Down Expand Up @@ -5458,6 +5464,7 @@ i.toc-sub-item {
/** The Portal Visualization View **/
.portal-viz-section-view{
background-color: black;
height: 100%;
}
.portal-viz-section-view iframe{
box-sizing: border-box;
Expand Down
5 changes: 5 additions & 0 deletions src/js/themes/knb/css/metacatui.css
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@

/* Portal & Editor (minimal header common to both views)
-------------------------------------------------- */
.PortalView {
/* Rows template differs from metacatui-common.css due to hiding #HeaderContainer. */
grid-template-rows: 40px 100fr;
}

#Navbar .navbar-inner:before, .navbar-inner:after {
display: none;
}
Expand Down

0 comments on commit ee2bed7

Please sign in to comment.