mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 09:41:40 -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();
|
this.setupTracksSubscription();
|
||||||
|
|
||||||
// Handle routes/tracks mode selection
|
// Handle routes/tracks mode selection
|
||||||
// this.addRoutesTracksSelector(); # Temporarily disabled
|
if (this.shouldShowTracksSelector()) {
|
||||||
|
this.addRoutesTracksSelector();
|
||||||
|
}
|
||||||
this.switchRouteMode('routes', true);
|
this.switchRouteMode('routes', true);
|
||||||
|
|
||||||
// Initialize layers based on settings
|
// Initialize layers based on settings
|
||||||
|
|
@ -1104,6 +1106,11 @@ export default class extends BaseController {
|
||||||
this.map.addControl(new TogglePanelControl({ position: 'topright' }));
|
this.map.addControl(new TogglePanelControl({ position: 'topright' }));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
shouldShowTracksSelector() {
|
||||||
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
|
return urlParams.get('tracks_debug') === 'true';
|
||||||
|
}
|
||||||
|
|
||||||
addRoutesTracksSelector() {
|
addRoutesTracksSelector() {
|
||||||
// Store reference to the controller instance for use in the control
|
// Store reference to the controller instance for use in the control
|
||||||
const controller = this;
|
const controller = this;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue