Skip to content

Commit

Permalink
Make background buttons and close buttons in legend align on all brow…
Browse files Browse the repository at this point in the history
…sers (#1994)
  • Loading branch information
huggla authored May 17, 2024
1 parent f51c8ad commit 278d2b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
13 changes: 5 additions & 8 deletions src/controls/legend.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,7 @@ const Legend = function Legend(options = {}) {
},
style: {
'vertical-align': 'bottom',
'margin-bottom': '13px',
'padding-right': '6px'
margin: '0.45rem 0.5rem'
},
icon: '#ic_close_fullscreen_24px',
iconStyle: {
Expand All @@ -213,8 +212,7 @@ const Legend = function Legend(options = {}) {
},
style: {
'vertical-align': 'bottom',
'margin-bottom': '13px',
'padding-right': '6px'
margin: '0.45rem 0.5rem'
},
icon: '#ic_open_in_full_24px',
iconStyle: {
Expand Down Expand Up @@ -666,8 +664,7 @@ const Legend = function Legend(options = {}) {
cls: 'icon-smaller small round grey-lightest',
style: {
'vertical-align': 'bottom',
'margin-bottom': '8.5px',
'margin-top': '-2px'
margin: '0.2rem 0'
},
icon: '#ic_close_24px',
state: closeButtonState,
Expand Down Expand Up @@ -699,7 +696,7 @@ const Legend = function Legend(options = {}) {
style: {
display: 'inline',
'text-align': 'right',
'margin-right': '6px'
'margin-right': '0.1rem'
},
components: legendControlCmps
});
Expand All @@ -712,7 +709,7 @@ const Legend = function Legend(options = {}) {
'background-color': '#fff',
'border-top': '1px solid #dbdbdb',
'border-radius': '0.5rem',
'padding-bottom': '6px'
'line-height': '0'
},
components: baselayerCmps
});
Expand Down
2 changes: 1 addition & 1 deletion src/controls/legend/visibleOverlays.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const Overlays = function Overlays(options) {
mainComponent: groupContainer,
secondaryComponent: layerProps,
cls: 'right flex width-100',
style: { width: '100%' },
style: { width: '100%', display: 'flex' },
legendSlideNav: false,
viewer
});
Expand Down

0 comments on commit 278d2b7

Please sign in to comment.