Merge pull request #666 from orangemug/fix/issue-646

Fix to make layer list header visible at all times
This commit is contained in:
Orange Mug 2020-04-26 10:15:33 +01:00 committed by GitHub
commit 857117eb71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 29 additions and 12 deletions

View file

@ -210,7 +210,11 @@ export default class Toolbar extends React.Component {
<ToolbarSelect wdKey="nav:inspect"> <ToolbarSelect wdKey="nav:inspect">
<MdFindInPage /> <MdFindInPage />
<IconText>View </IconText> <IconText>View </IconText>
<select onChange={(e) => this.handleSelection(e.target.value)} value={currentView.id}> <select
className="maputnik-select"
onChange={(e) => this.handleSelection(e.target.value)}
value={currentView.id}
>
{views.map((item) => { {views.map((item) => {
return ( return (
<option key={item.id} value={item.id} disabled={item.disabled}> <option key={item.id} value={item.id} disabled={item.disabled}>

View file

@ -97,6 +97,13 @@
.maputnik-select { .maputnik-select {
@extend .maputnik-input; @extend .maputnik-input;
-moz-appearance: none;
-webkit-appearance: none;
background: $color-gray url("#{$icon-down-arrow}") right center no-repeat;
color: $color-white;
background-position: calc(100% - 2px) center;
padding-right: 20px;
height: 24px; height: 24px;
} }

View file

@ -2,11 +2,14 @@
.maputnik-layer-list { .maputnik-layer-list {
height: 100%; height: 100%;
overflow: auto; overflow: auto;
display: flex;
flex-direction: column;
&-header { &-header {
padding: $margin-2 $margin-2 $margin-3; padding: $margin-2 $margin-2 $margin-3;
@include flex-row; @include flex-row;
flex: 0 0;
> * { > * {
vertical-align: middle; vertical-align: middle;
@ -25,6 +28,9 @@
padding: 0; padding: 0;
margin: 0; margin: 0;
padding-bottom: $margin-5; padding-bottom: $margin-5;
flex: 1;
overflow-x: hidden;
overflow-y: auto;
} }
&-item-handle { &-item-handle {

View file

@ -1,5 +1,4 @@
// HACK: ::webkit-scrollbar selector covers to much of the UI. Bigger changes to come so for now just use :not() to ignore the toolbar *:not(select) {
div:not(.maputnik-toolbar__actions) {
&::-webkit-scrollbar { &::-webkit-scrollbar {
background-color: #26282e; background-color: #26282e;
width: 8px; width: 8px;

View file

@ -17,7 +17,7 @@
text-decoration: none; text-decoration: none;
display: block; display: block;
flex: 0 0 190px; flex: 0 0 190px;
width: 190px; width: 200px;
text-align: left; text-align: left;
background-color: $color-black; background-color: $color-black;
padding: $margin-2; padding: $margin-2;
@ -102,15 +102,13 @@
@extend .maputnik-toolbar-link; @extend .maputnik-toolbar-link;
select { select {
// HACK: <https://github.com/maputnik/editor/pull/392#issuecomment-427595172> margin-left: 6px;
color: $color-black !important;
margin-left: 4px;
border-width: 0; border-width: 0;
display: inline;
option { width: auto;
// HACK: <https://github.com/maputnik/editor/pull/392#issuecomment-427595172> border: solid 1px $color-midgray;
color: $color-black !important; vertical-align: inherit;
} margin-top: -2px;
} }
} }

View file

@ -25,3 +25,6 @@ $layout-list-width: 200px;
$layout-editor-width: 370px; $layout-editor-width: 370px;
$layout-map-width: calc(100% - #{$layout-list-width + $layout-editor-width}); $layout-map-width: calc(100% - #{$layout-list-width + $layout-editor-width});
// 'menu-down' from 'https://materialdesignicons.com/'
// See <https://github.com/Templarian/MaterialDesign/blob/master/LICENSE>
$icon-down-arrow: "data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'><path fill='white' d='M7,10L12,15L17,10H7Z' /></svg>"