Handle a zero value for scale
This commit is contained in:
parent
2f89bd28b7
commit
8a83449fba
|
@ -160,7 +160,7 @@ function changeScale() {
|
|||
} else {
|
||||
eventViewer = $j(vid ? '#videoobj' : '#evtStream');
|
||||
}
|
||||
if ( scale == "auto" ) {
|
||||
if ( scale == '0' ) {
|
||||
var newSize = scaleToFit(eventData.Width, eventData.Height, eventViewer, bottomEl);
|
||||
newWidth = newSize.width;
|
||||
newHeight = newSize.height;
|
||||
|
@ -175,7 +175,7 @@ function changeScale() {
|
|||
} // stills handles its own width
|
||||
eventViewer.height(newHeight);
|
||||
if ( !vid ) { // zms needs extra sizing
|
||||
streamScale(scale == "auto" ? autoScale : scale);
|
||||
streamScale(scale == '0' ? autoScale : scale);
|
||||
drawProgressBar();
|
||||
}
|
||||
if ( streamMode == 'stills' ) {
|
||||
|
@ -184,7 +184,7 @@ function changeScale() {
|
|||
} else {
|
||||
alarmCue.html(renderAlarmCues(eventViewer));//just re-render alarmCues. skip ajax call
|
||||
}
|
||||
if ( scale == "auto" ) {
|
||||
if ( scale == '0' ) {
|
||||
Cookie.write('zmEventScaleAuto', 'auto', {duration: 10*365});
|
||||
} else {
|
||||
Cookie.write('zmEventScale'+eventData.MonitorId, scale, {duration: 10*365});
|
||||
|
@ -1091,7 +1091,7 @@ function initPage() {
|
|||
}
|
||||
nearEventsQuery(eventData.Id);
|
||||
initialAlarmCues(eventData.Id); //call ajax+renderAlarmCues
|
||||
if ( scale == 'auto' ) changeScale();
|
||||
if ( scale == '0' ) changeScale();
|
||||
}
|
||||
|
||||
// Kick everything off
|
||||
|
|
Loading…
Reference in New Issue