Skip to content

Commit

Permalink
View/Hide Video Control
Browse files Browse the repository at this point in the history
Allow the hiding of the video after loaded
  • Loading branch information
Gary Keeble committed May 16, 2016
1 parent 68fe407 commit 24f0913
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
12 changes: 11 additions & 1 deletion css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;
}

Expand Down Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ <h4>View</h4>
<button type="button" class="btn btn-default open-header-dialog" title="View/hide header">
<span class="glyphicon glyphicon-info-sign"></span>
</button>
<button type="button" class="btn btn-default view-video" title="View/hide video display">
<span class="glyphicon glyphicon-film"></span>
</button>
<button type="button" class="btn btn-default view-craft" title="View/hide craft display">
<span class="glyphicon glyphicon-plane"></span>
</button>
Expand Down
7 changes: 6 additions & 1 deletion js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit 24f0913

Please sign in to comment.