Commit c9d4ea74 authored by pacome's avatar pacome

[client/timeserie] update style on plot legend

parent 4eeab8d1
import { DIV, H2, SPAN, H3 } from 'sdi/components/elements';
import { DIV, SPAN, H3 } from 'sdi/components/elements';
import tr, { fromRecord } from 'sdi/locale';
import {
getSelectedKind,
......
import { DIV, H2, SPAN } from 'sdi/components/elements';
import { DIV, H3, SPAN } from 'sdi/components/elements';
import tr, { fromRecord } from 'sdi/locale';
import {
getSelectedParameterList,
......@@ -7,9 +7,8 @@ import {
getHighligthParameter,
getPlotNorms,
getSelectedStationIndex,
getSelectedStationList,
// getSelectedStationList,
getTimeserieBetweenDates,
// getSelectedStationIndex,
// getFeatureFromSelection,
// getSelectedStationList
} from '../../queries/timeserie';
......@@ -27,7 +26,6 @@ import debug = require('debug');
import { PlotNorm } from '../plot';
import { StationSelection } from 'timeserie/src/types';
import { stationString } from 'timeserie/src/queries/table';
import { markdown } from 'sdi/ports/marked';
// import { StationSelection } from 'timeserie/src/types';
// import { getFeaturePropOption } from 'sdi/util';
// import { renderButtonTableModeParameters } from '../button';
......@@ -125,7 +123,7 @@ const renderLegendItem = (param: Parameter, i: number) => {
const renderParamsLegend = () =>
DIV(
{ className: 'legend__group legend--params' },
H2({}, tr.ts('parameter')),
H3({}, tr.ts('parameter')),
DIV(
{ className: 'legend-items__wrapper' },
getSelectedParameterList().map((pl, index) =>
......@@ -150,27 +148,7 @@ export const renderStation = (s: StationSelection, index: number) =>
SPAN({ className: 'name' }, stationString(s))
);
const renderStationList = () =>
DIV(
{ className: 'table-item-list' },
getSelectedStationList().map(renderStation)
);
const renderMultiselectHelp = () =>
DIV(
{ className: 'helptext' },
markdown(tr.ts('stationMultiselectHelptext'))
);
const renderStations = () =>
DIV(
{},
H2({}, tr.ts('perStation')),
renderMultiselectHelp(),
renderStationList()
);
const render = () =>
DIV({ className: 'plot-legend' }, renderParamsLegend(), renderStations());
const render = () => DIV({ className: 'plot-legend' }, renderParamsLegend());
logger('loaded');
......
......@@ -89,8 +89,8 @@ const notSelectedParam = (kind: ParameterType) => {
selection.findIndex((s) => s.id === p.id && s.kind === kind) === -1;
};
const renderHelpText = () =>
DIV({ className: 'helptext' }, tr.ts('helptext:paramsPicker'));
// const renderHelpText = () =>
// DIV({ className: 'helptext' }, tr.ts('helptext:paramsPicker'));
const unselectButton = (kind: ParameterType, id: number) =>
renderDeselectButton(() => deselectParameter(kind, id));
......
import { DIV } from 'sdi/components/elements';
import { DIV, H3 } from 'sdi/components/elements';
import map from '../map';
import legend from '../legend/map';
import plotLegend from '../legend/plot';
import plotLegend, { renderStation } from '../legend/plot';
import info from '../info';
import plot from '../plot';
import {
......@@ -15,7 +15,12 @@ import { navigateConfig, getConfig } from 'timeserie/src/events/route';
import renderDatesInputBox from '../date-picker';
import renderNoDataMessage from '../nodata-message';
import renderSelection from '../point-selector';
import { getLevel } from 'timeserie/src/queries/timeserie';
import {
getLevel,
getSelectedStationList,
} from 'timeserie/src/queries/timeserie';
import { markdown } from 'sdi/ports/marked';
import tr from 'sdi/locale';
const renderActions = () =>
DIV(
......@@ -39,10 +44,30 @@ const renderContentSideFooter = () =>
renderButtonTableSmall()
);
const renderStationList = () =>
DIV(
{ className: 'table-item-list' },
getSelectedStationList().map(renderStation)
);
const renderMultiselectHelp = () =>
DIV(
{ className: 'helptext' },
markdown(tr.ts('stationMultiselectHelptext'))
);
const renderStations = () =>
DIV(
{},
H3({}, tr.ts('perStation')),
renderMultiselectHelp(),
renderStationList()
);
const renderSidebar = () =>
DIV(
{ className: 'content__side' },
legend(),
renderStations(),
info(),
plotLegend(),
renderContentSideFooter()
......
......@@ -67,9 +67,9 @@
overflow: auto;
.map-info {
height: 100%;
overflow-y: auto;
overflow-x: hidden;
// height: 100%;
// overflow-y: auto;
// overflow-x: hidden;
}
&--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