diff --git a/css/main.css b/css/main.css
index 07a982dc..2d1e54f7 100644
--- a/css/main.css
+++ b/css/main.css
@@ -307,22 +307,18 @@ html .view-craft,
html .view-sticks,
html .view-table,
html .view-analyser,
+html .view-analyser-sticks,
html .view-analyser-fullscreen {
color:black;
}
+html.has-analyser-sticks .view-analyser-sticks,
+html.has-analyser .view-analyser,
+html.has-table .view-table,
+html.has-sticks .view-sticks,
html.has-craft .view-craft {
color:green;
}
-html.has-sticks .view-sticks {
- color:green;
-}
-html.has-table .view-table {
- color:green;
-}
-html.has-analyser .view-analyser {
- color:green;
-}
html:not(.has-analyser-fullscreen) .glyphicon-resize-small {
display:none;
diff --git a/index.html b/index.html
index e02c5bbc..3a06b5a1 100755
--- a/index.html
+++ b/index.html
@@ -160,6 +160,12 @@
View
+
+
@@ -169,6 +175,9 @@
View
+
@@ -262,15 +271,13 @@ Log sync
+
Legend
-
-
-
diff --git a/js/main.js b/js/main.js
index f6f2d4c5..2217ffa3 100644
--- a/js/main.js
+++ b/js/main.js
@@ -55,12 +55,14 @@ function BlackboxLogViewer() {
hasVideo = false, hasLog = false, hasMarker = false, // add measure feature
hasTable = true, hasCraft = true, hasSticks = true, hasAnalyser, hasAnalyserFullscreen,
+ hasAnalyserSticks = false,
isFullscreen = false, // New fullscreen feature (to hide table)
video = $(".log-graph video")[0],
canvas = $("#graphCanvas")[0],
analyserCanvas = $("#analyserCanvas")[0],
+ analyserStickCanvas = $("#analyserStickCanvas")[0],
craftCanvas = $("#craftCanvas")[0],
videoURL = false,
videoOffset = 0.0,
@@ -756,6 +758,12 @@ function BlackboxLogViewer() {
prefs.set('hasTable', hasTable);
});
+ $(".view-analyser-sticks").click(function() {
+ hasAnalyserSticks = !hasAnalyserSticks;
+ (hasAnalyserSticks)?$("html").addClass("has-analyser-sticks"):$("html").removeClass("has-analyser-sticks");
+ prefs.set('hasAnalyserSticks', hasAnalyserSticks);
+ });
+
$(".view-analyser").click(function() {
if(activeGraphConfig.selectedFieldName != null) {
hasAnalyser = !hasAnalyser;
diff --git a/js/tools.js b/js/tools.js
index b6b12984..a3771fa9 100644
--- a/js/tools.js
+++ b/js/tools.js
@@ -189,15 +189,15 @@ function formatTime(msec, displayMsec) {
function stringTimetoMsec(input) {
try {
- var matches = input.match(/([+-]?[0-9]+)(\D)*([0-9]+)*\D*([0-9]+)*/);
+ var matches = input.match(/([-])?([0-9]+)(\D)*([0-9]+)*\D*([0-9]+)*/);
if(matches.length>2) { // there is a placeholder - either : or .
- if(matches[2] == ':'){ // time has been entered MM:SS.SSS
- return matches[1] * 60 * 1000000 + ((matches[3])?matches[3]:0) * 1000000 + ((matches[4])?(matches[4] + "00").slice(0,3):0) * 1000
+ if(matches[3] == ':'){ // time has been entered MM:SS.SSS
+ return ((matches[1])?-1:1) * (matches[2] * 60 * 1000000 + ((matches[4])?matches[4]:0) * 1000000 + ((matches[5])?(matches[5] + "00").slice(0,3):0) * 1000);
} else {
- return matches[1] * 1000000 + ((matches[3])?(matches[3] + "00").slice(0,3):0) * 1000;
+ return ((matches[1])?-1:1) * (matches[2] * 1000000 + ((matches[4])?(matches[4] + "00").slice(0,3):0) * 1000);
}
- } else return matches[1] * 1000000;
+ } else return ((matches[1])?-1:1) * (matches[2] * 1000000);
} catch(e) {
return 0;
}