Skip to content

Commit

Permalink
ZoneMinder#775 fix graph position
Browse files Browse the repository at this point in the history
  • Loading branch information
pliablepixels committed Feb 1, 2019
1 parent 51aa7ce commit 7066ba7
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 12 deletions.
8 changes: 7 additions & 1 deletion www/js/MontageHistoryCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -960,10 +960,14 @@ angular.module('zmApp.controllers').controller('zmApp.MontageHistoryCtrl', ['$sc
NVR.debug("Player is ready");
$timeout(function () {
m.Monitor.handle.pause();
m.Monitor.handle.setPlayback(NVR.getLogin().videoPlaybackSpeed);

$timeout(function() {
m.Monitor.handle.setPlayback(NVR.getLogin().videoPlaybackSpeed);
m.Monitor.handle.play();
NVR.debug("*** Invoking play");
playerReady = true;
},300);


}, 300);

Expand Down Expand Up @@ -1371,7 +1375,9 @@ angular.module('zmApp.controllers').controller('zmApp.MontageHistoryCtrl', ['$sc
//console.log("Graphing on " + "eventchart-" + mid);
var cv = document.getElementById("eventchart-" + mid);
var ctx = cv.getContext("2d");
// ctx.height=30;
frameoptions = {
maintainAspectRatio: false,
responsive: true,
legend: false,
title: {
Expand Down
31 changes: 20 additions & 11 deletions www/templates/montage-history.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,20 +110,29 @@
on-swipe-left="toggleControls()" on-swipe-right="toggleControls()" img-spinner-w="{{monitor.Monitor.Width}}"
img-spinner-h="{{monitor.Monitor.Height}}" />


<div ng-show="packeryDone" >

<div class="range" style="position:absolute;top:20%;width:95%;z-index:999">
<input on-release="seek(monitor.Monitor.Id,monitor.Monitor.sliderProgress.progress )" type="range" min="0"
max="{{monitor.Monitor.eventDuration}}" ng-model="monitor.Monitor.sliderProgress.progress">


</div>

<div id="history_canvas_video" style="height: 30px; position:absolute; top:20%">
<canvas style="padding-left:23px;
padding-right:23px; z-index:900" id="eventchart-{{monitor.Monitor.Id}}"


></canvas>
</div>
</div>


</figure>
<!-- wait for packery otherwise we get large ranges -->
<div ng-show="packeryDone">
<div class="range" style="position:absolute;top:5%;width:95%;z-index:999">
<input on-release="seek(monitor.Monitor.Id,monitor.Monitor.sliderProgress.progress )" type="range" min="0"
max="{{monitor.Monitor.eventDuration}}" ng-model="monitor.Monitor.sliderProgress.progress">
</div>
<div id="history_canvas_video">
<canvas style="padding-left:23px;
padding-right:23px;z-index:998" id="eventchart-{{monitor.Monitor.Id}}"
width="auto" height="20"></canvas>
</div>
</div>

<div ng-if="monitor.Monitor.seek" style="position:absolute;top:0px; left: 0px; width:100%;height:100%; background-color:rgba(0,0,0,0.3); z-index:99999">
<div style="position:relative;top:50%;text-align:center;color:white;background-color:rgba(0,0,0,0.5);">{{'kPleaseWait'
| translate}}</div>
Expand Down

0 comments on commit 7066ba7

Please sign in to comment.