diff --git a/index.html b/index.html
index b9d6a803..cd53443f 100644
--- a/index.html
+++ b/index.html
@@ -2740,6 +2740,15 @@
Advanced User Settings
Show the gradient background.
+
diff --git a/js/grapher.js b/js/grapher.js
index 0bb19704..eecdda38 100644
--- a/js/grapher.js
+++ b/js/grapher.js
@@ -812,7 +812,7 @@ function FlightLogGrapher(flightLog, graphConfig, canvas, stickCanvas, craftCanv
}
//Draw a bar highlighting the current time if we are drawing any graphs
- if (graphs.length) {
+ if (options.drawVerticalBar && graphs.length) {
var
centerX = canvas.width / 2;
diff --git a/js/main.js b/js/main.js
index de6e7c3c..67102a2c 100644
--- a/js/main.js
+++ b/js/main.js
@@ -1346,14 +1346,13 @@ function BlackboxLogViewer() {
userSettingsDialog = new UserSettingsDialog($("#dlgUserSettings"),
function(defaultSettings) { // onLoad
-
- prefs.get('userSettings', function(item) {
- if(item) {
- userSettings = item;
- } else {
- userSettings = defaultSettings;
- }
- });
+ prefs.get('userSettings', function(item) {
+ if (item) {
+ userSettings = $.extend({}, defaultSettings, item);
+ } else {
+ userSettings = defaultSettings;
+ }
+ });
},
function(newSettings) { // onSave
diff --git a/js/user_settings_dialog.js b/js/user_settings_dialog.js
index 2319b6a8..2bd02505 100644
--- a/js/user_settings_dialog.js
+++ b/js/user_settings_dialog.js
@@ -55,6 +55,7 @@ function UserSettingsDialog(dialog, onLoad, onSave) {
drawWatermark : false, // Show Watermark on display?
drawLapTimer : false, // Show Laptimer on display?
drawGradient : false, // Show Gradient on display?
+ drawVerticalBar : true, // Show vertical timebar on display?
graphSmoothOverride : false, // Ability to toggle smoothing off=normal/ on=force 0%
graphExpoOverride : false, // Ability to toggle Expo off=normal/ on=force 100%
graphGridOverride : false, // Ability to toggle Expo off=normal/ on=force 100%
@@ -138,6 +139,7 @@ function UserSettingsDialog(dialog, onLoad, onSave) {
transparency: $('.laptimer-settings input[name="laptimer-transparency"]').val() + '%', },
drawLapTimer: ($(".laptimer").is(":checked")),
drawGradient: ($(".gradient").is(":checked")),
+ drawVerticalBar: ($(".verticalBar").is(":checked")),
});
return settings;
}
@@ -422,6 +424,11 @@ function UserSettingsDialog(dialog, onLoad, onSave) {
$(".gradient").prop('checked', currentSettings.drawGradient);
}
+ if (currentSettings.drawVerticalBar != null) {
+ // set the toggle switch
+ $(".verticalBar").prop('checked', currentSettings.drawVerticalBar);
+ }
+
dialog.modal('show');
};