@@ -375,24 +375,6 @@ if ( currentView != 'none' && currentView != 'login' ) {
375
375
}
376
376
} ) ;
377
377
378
- // Manage the web console filter bar minimize chevron
379
- /*$j("#mfbflip").click(function() {
380
- $j("#mfbpanel").slideToggle("slow", function() {
381
- if ($j.isFunction('changeScale')) {
382
- changeScale();
383
- }
384
- });
385
- var mfbflip = $j("#mfbflip");
386
- if ( mfbflip.html() == 'keyboard_arrow_up' ) {
387
- mfbflip.html('keyboard_arrow_down');
388
- setCookie('zmMonitorFilterBarFlip', 'up');
389
- } else {
390
- mfbflip.html('keyboard_arrow_up');
391
- setCookie('zmMonitorFilterBarFlip', 'down');
392
- $j('.chosen').chosen("destroy");
393
- $j('.chosen').chosen();
394
- }
395
- });*/
396
378
// Autoclose the hamburger button if the end user clicks outside the button
397
379
$j ( document ) . click ( function ( event ) {
398
380
var target = $j ( event . target ) ;
@@ -514,7 +496,12 @@ function checkStreamForErrors(funcName, streamObj) {
514
496
Error ( funcName + ': stream object was null' ) ;
515
497
return true ;
516
498
}
517
- if ( streamObj . result == "Error" ) {
499
+ if ( streamObj . responseJSON ) {
500
+ if ( streamObj . responseJSON . result == "Error" ) {
501
+ Error ( funcName + ' stream error: ' + streamObj . responseJSON . message ) ;
502
+ return true ;
503
+ }
504
+ } else if ( streamObj . result == "Error" ) {
518
505
Error ( funcName + ' stream error: ' + streamObj . message ) ;
519
506
return true ;
520
507
}
@@ -727,22 +714,6 @@ function scaleToFit(baseWidth, baseHeight, scaleEl, bottomEl, container, panZoom
727
714
newHeight = newWidth / ratio ;
728
715
}
729
716
let autoScale = Math . round ( newWidth / baseWidth * SCALE_BASE * panZoomScale ) ;
730
- /* IgorA100 not required due to new "Scale" algorithm & new PanZoom (may 2024)
731
- const scales = $j('#scale option').map(function() {
732
- return parseInt($j(this).val());
733
- }).get();
734
- scales.shift(); // pop off Scale To Fit
735
- let closest = null;
736
- $j(scales).each(function() { //Set zms scale to nearest regular scale. Zoom does not like arbitrary scale values.
737
- if (closest == null || Math.abs(this - autoScale) < Math.abs(closest - autoScale)) {
738
- closest = this.valueOf();
739
- }
740
- });
741
- if (closest) {
742
- console.log("Setting to closest: " + closest + " instead of " + autoScale);
743
- autoScale = closest;
744
- }
745
- */
746
717
// Floor to nearest value % 5. THe 5 is somewhat arbitrary. The point is that scaling by 88% is not better than 85%. Perhaps it should be to the nearest 10. Or 25 even.
747
718
autoScale = 5 * Math . floor ( autoScale / 5 ) ;
748
719
if ( autoScale < 10 ) autoScale = 10 ;
@@ -1210,7 +1181,6 @@ function thisClickOnStreamObject(clickObj) {
1210
1181
return true ;
1211
1182
} else if ( clickObj . id . indexOf ( 'monitorStatus' ) != - 1 ) {
1212
1183
return document . getElementById ( 'monitor' + stringToNumber ( clickObj . id ) ) ;
1213
- //return clickObj;
1214
1184
} else if ( clickObj . id . indexOf ( 'videoobj' ) != - 1 ) {
1215
1185
return document . getElementById ( 'eventVideo' ) ;
1216
1186
} else return false ;
@@ -1233,7 +1203,10 @@ var doubleTouchExecute = function(event, touchEvent) {
1233
1203
} ;
1234
1204
1235
1205
var doubleClickOnStream = function ( event , touchEvent ) {
1236
- if ( shifted || ctrled || alted ) return ;
1206
+ if ( shifted || ctrled || alted ) {
1207
+ console . log ( "Shift or Ctrl or Alt button was pressed, double-click event was not processed." ) ;
1208
+ return ;
1209
+ }
1237
1210
let target = null ;
1238
1211
if ( event . target ) { // Click NOT on touch screen, use THIS
1239
1212
//Process only double clicks directly on the image, excluding clicks,
0 commit comments