From 24f09130dee16de4da39a3500ca557c5e34c902d Mon Sep 17 00:00:00 2001 From: Gary Keeble Date: Mon, 16 May 2016 08:29:11 +0100 Subject: [PATCH] View/Hide Video Control Allow the hiding of the video after loaded --- css/main.css | 12 +++++++++++- index.html | 3 +++ js/main.js | 7 ++++++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/css/main.css b/css/main.css index 2d1e54f7..a8da89f0 100644 --- a/css/main.css +++ b/css/main.css @@ -303,6 +303,7 @@ html.has-video #graphCanvas { background-color:rgba(0,0,0,0.25); } +html .view-video, html .view-craft, html .view-sticks, html .view-table, @@ -316,7 +317,8 @@ 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 { +html.has-craft .view-craft, +html:not(.video-hidden) .view-video { color:green; } @@ -412,6 +414,14 @@ html.has-log .log-graph { display:none; } +html.video-hidden video { + display:none; +} + +html:not(.has-video) .view-video { + visibility:hidden +} + html.has-log .main-pane, html.has-video .main-pane { display:block; diff --git a/index.html b/index.html index 60686aec..91f129db 100755 --- a/index.html +++ b/index.html @@ -166,6 +166,9 @@

View

+ diff --git a/js/main.js b/js/main.js index 2217ffa3..063d74ed 100644 --- a/js/main.js +++ b/js/main.js @@ -55,7 +55,7 @@ function BlackboxLogViewer() { hasVideo = false, hasLog = false, hasMarker = false, // add measure feature hasTable = true, hasCraft = true, hasSticks = true, hasAnalyser, hasAnalyserFullscreen, - hasAnalyserSticks = false, + hasAnalyserSticks = false, viewVideo = true, isFullscreen = false, // New fullscreen feature (to hide table) @@ -738,6 +738,11 @@ function BlackboxLogViewer() { }); // New View Controls + $(".view-video").click(function() { + viewVideo = !viewVideo; + (!viewVideo)?$("html").addClass("video-hidden"):$("html").removeClass("video-hidden"); + }); + $(".view-craft").click(function() { hasCraft = !hasCraft; (hasCraft)?$("html").addClass("has-craft"):$("html").removeClass("has-craft");