From 1ac64a58e002c7734cfe79f8654e27fa2816c1b1 Mon Sep 17 00:00:00 2001 From: Henriette Dinger Date: Wed, 23 Oct 2019 15:19:46 +0200 Subject: [PATCH] Set query params of timeline and highlighting to override the queries default if necessary --- .../src/app/components/wp-query/url-params-helper.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/components/wp-query/url-params-helper.ts b/frontend/src/app/components/wp-query/url-params-helper.ts index 50637f53a7..5e012b1b7f 100644 --- a/frontend/src/app/components/wp-query/url-params-helper.ts +++ b/frontend/src/app/components/wp-query/url-params-helper.ts @@ -98,7 +98,7 @@ export class UrlParamsHelperService { } private encodeHighlightingMode(paramsData:any, query:QueryResource) { - if (query.highlightingMode && query.highlightingMode !== 'inline') { + if (query.highlightingMode && (query.persisted || query.highlightingMode !== 'inline')) { paramsData.hl = query.highlightingMode; } return paramsData; @@ -154,6 +154,8 @@ export class UrlParamsHelperService { } paramsData.tzl = query.timelineZoomLevel; + } else { + paramsData.tv = false; } return paramsData; } @@ -176,9 +178,10 @@ export class UrlParamsHelperService { if (!!properties.s) { queryData.showSums = properties.s; } - if (!!properties.tv) { - queryData.timelineVisible = properties.tv; + queryData.timelineVisible = properties.tv; + + if (!!properties.tv) { if (!!properties.tll) { queryData.timelineLabels = properties.tll; }