Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make background buttons and close buttons in legend align on all browsers #1994

Merged
merged 19 commits into from
May 17, 2024
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
Loading