Skip to content

Commit 24f0913

Browse files
author
Gary Keeble
committed
View/Hide Video Control
Allow the hiding of the video after loaded
1 parent 68fe407 commit 24f0913

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

css/main.css

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ html.has-video #graphCanvas {
303303
background-color:rgba(0,0,0,0.25);
304304
}
305305

306+
html .view-video,
306307
html .view-craft,
307308
html .view-sticks,
308309
html .view-table,
@@ -316,7 +317,8 @@ html.has-analyser-sticks .view-analyser-sticks,
316317
html.has-analyser .view-analyser,
317318
html.has-table .view-table,
318319
html.has-sticks .view-sticks,
319-
html.has-craft .view-craft {
320+
html.has-craft .view-craft,
321+
html:not(.video-hidden) .view-video {
320322
color:green;
321323
}
322324

@@ -412,6 +414,14 @@ html.has-log .log-graph {
412414
display:none;
413415
}
414416

417+
html.video-hidden video {
418+
display:none;
419+
}
420+
421+
html:not(.has-video) .view-video {
422+
visibility:hidden
423+
}
424+
415425
html.has-log .main-pane,
416426
html.has-video .main-pane {
417427
display:block;

index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@ <h4>View</h4>
166166
<button type="button" class="btn btn-default open-header-dialog" title="View/hide header">
167167
<span class="glyphicon glyphicon-info-sign"></span>
168168
</button>
169+
<button type="button" class="btn btn-default view-video" title="View/hide video display">
170+
<span class="glyphicon glyphicon-film"></span>
171+
</button>
169172
<button type="button" class="btn btn-default view-craft" title="View/hide craft display">
170173
<span class="glyphicon glyphicon-plane"></span>
171174
</button>

js/main.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function BlackboxLogViewer() {
5555

5656
hasVideo = false, hasLog = false, hasMarker = false, // add measure feature
5757
hasTable = true, hasCraft = true, hasSticks = true, hasAnalyser, hasAnalyserFullscreen,
58-
hasAnalyserSticks = false,
58+
hasAnalyserSticks = false, viewVideo = true,
5959

6060
isFullscreen = false, // New fullscreen feature (to hide table)
6161

@@ -738,6 +738,11 @@ function BlackboxLogViewer() {
738738
});
739739

740740
// New View Controls
741+
$(".view-video").click(function() {
742+
viewVideo = !viewVideo;
743+
(!viewVideo)?$("html").addClass("video-hidden"):$("html").removeClass("video-hidden");
744+
});
745+
741746
$(".view-craft").click(function() {
742747
hasCraft = !hasCraft;
743748
(hasCraft)?$("html").addClass("has-craft"):$("html").removeClass("has-craft");

0 commit comments

Comments
 (0)