Commit bf274e1a authored by pacome's avatar pacome

[client/timeserie] update style on map info

parent 89cce2ee
......@@ -11,7 +11,10 @@ const isSelected = (legendLevel: Level) =>
const renderSurface = () =>
DIV(
{ className: `legend-item legend-item--${isSelected('surface')}` },
{
key: 'legendSurface',
className: `legend-item legend-item--${isSelected('surface')}`,
},
DIV(
{
className: 'item-style',
......@@ -27,7 +30,10 @@ const renderSurface = () =>
const renderGroundQuality = () =>
DIV(
{ className: `legend-item legend-item--${isSelected('ground')}` },
{
key: 'legendGroundQuality',
className: `legend-item legend-item--${isSelected('ground')}`,
},
DIV(
{
className: 'item-style',
......@@ -43,7 +49,10 @@ const renderGroundQuality = () =>
const renderGroundQuantity = () =>
DIV(
{ className: `legend-item legend-item--${isSelected('ground')}` },
{
key: 'legendGroundQuantity',
className: `legend-item legend-item--${isSelected('ground')}`,
},
DIV(
{
className: 'item-style',
......@@ -57,13 +66,19 @@ const renderGroundQuantity = () =>
DIV({ className: 'item-label' }, tr.ts('legendGroundQuantity'))
);
const levelLegendSwitch = () =>
getLevel().map((level) => {
if (level === 'ground') {
return [renderGroundQuality(), renderGroundQuantity()];
}
return [renderSurface()];
});
const render = () =>
DIV(
{ className: 'map-legend' },
H3({}, tr.ts('legend')),
renderSurface(),
renderGroundQuality(),
renderGroundQuantity()
levelLegendSwitch()
);
export default render;
......@@ -79,9 +79,9 @@
.map-info {
overflow: auto;
// height: 100%;
// overflow-y: auto;
// overflow-x: hidden;
// padding: @margin;
// background: @bgLightColor;
padding-left: 35px;
}
&--footer {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment