mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
Enable tracks toggle when debug flag present
This commit is contained in:
parent
cf987894fe
commit
289ce5dabb
1 changed files with 8 additions and 1 deletions
|
|
@ -214,7 +214,9 @@ export default class extends BaseController {
|
|||
this.setupTracksSubscription();
|
||||
|
||||
// Handle routes/tracks mode selection
|
||||
// this.addRoutesTracksSelector(); # Temporarily disabled
|
||||
if (this.shouldShowTracksSelector()) {
|
||||
this.addRoutesTracksSelector();
|
||||
}
|
||||
this.switchRouteMode('routes', true);
|
||||
|
||||
// Initialize layers based on settings
|
||||
|
|
@ -1104,6 +1106,11 @@ export default class extends BaseController {
|
|||
this.map.addControl(new TogglePanelControl({ position: 'topright' }));
|
||||
}
|
||||
|
||||
shouldShowTracksSelector() {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
return urlParams.get('tracks_debug') === 'true';
|
||||
}
|
||||
|
||||
addRoutesTracksSelector() {
|
||||
// Store reference to the controller instance for use in the control
|
||||
const controller = this;
|
||||
|
|
|
|||
Loading…
Reference in a new issue