Set query params of timeline and highlighting to override the queries default if necessary

pull/7820/head
Henriette Dinger 5 years ago
parent f669022af1
commit 1ac64a58e0
  1. 9
      frontend/src/app/components/wp-query/url-params-helper.ts

@ -98,7 +98,7 @@ export class UrlParamsHelperService {
} }
private encodeHighlightingMode(paramsData:any, query:QueryResource) { private encodeHighlightingMode(paramsData:any, query:QueryResource) {
if (query.highlightingMode && query.highlightingMode !== 'inline') { if (query.highlightingMode && (query.persisted || query.highlightingMode !== 'inline')) {
paramsData.hl = query.highlightingMode; paramsData.hl = query.highlightingMode;
} }
return paramsData; return paramsData;
@ -154,6 +154,8 @@ export class UrlParamsHelperService {
} }
paramsData.tzl = query.timelineZoomLevel; paramsData.tzl = query.timelineZoomLevel;
} else {
paramsData.tv = false;
} }
return paramsData; return paramsData;
} }
@ -176,9 +178,10 @@ export class UrlParamsHelperService {
if (!!properties.s) { if (!!properties.s) {
queryData.showSums = properties.s; queryData.showSums = properties.s;
} }
if (!!properties.tv) {
queryData.timelineVisible = properties.tv;
queryData.timelineVisible = properties.tv;
if (!!properties.tv) {
if (!!properties.tll) { if (!!properties.tll) {
queryData.timelineLabels = properties.tll; queryData.timelineLabels = properties.tll;
} }

Loading…
Cancel
Save