Commit 2e98ef75 authored by Pierre Lemay's avatar Pierre Lemay

Integration des ajustements d'Eric

parent cef3a2a4
Pipeline #18493 failed with stages
......@@ -23,7 +23,6 @@ function Controls({mapOn}) {
return (
<ControlsContainer>
<ChooseDataset/>
<SidebarHeader>{t("sidebar:Date Range")}</SidebarHeader>
<DateRangeInputs/>
......
......@@ -36,9 +36,11 @@ export const createDefaultParams = () => ({
tipLabelPadX: 8,
tipLabelPadY: 2,
mapToScreenDebounceTime: 500,
tipLabelFontSizeL0: 6,
tipLabelFontSizeL1: 8,
tipLabelFontSizeL2: 10,
tipLabelFontSizeL3: 12,
tipLabelBreakL0: 150,
tipLabelBreakL1: 75,
tipLabelBreakL2: 50,
tipLabelBreakL3: 25
......
......@@ -19,14 +19,16 @@ export const updateTipLabels = function updateTipLabels(dt) {
const inViewVisibleTips = inViewTips.filter((d) => d.visibility === NODE_VISIBLE);
/* We show tip labels by checking the number of "inView & visible" tips */
if (inViewVisibleTips.length < this.params.tipLabelBreakL1) {
if (inViewVisibleTips.length < this.params.tipLabelBreakL0) {
/* We calculate font size based on the total number of in view tips (both visible & non-visible) */
let fontSize = this.params.tipLabelFontSizeL1;
let fontSize = this.params.tipLabelFontSizeL0;
if (inViewTips.length < this.params.tipLabelBreakL3) {
fontSize = this.params.tipLabelFontSizeL3;
} else if (inViewTips.length < this.params.tipLabelBreakL2) {
fontSize = this.params.tipLabelFontSizeL2;
} else if (inViewTips.length < this.params.tipLabelBreakL1) {
fontSize = this.params.tipLabelFontSizeL1;
}
window.setTimeout(() => {
......
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