From 0166fe5ad332bbc46ae0a74eacfe0d6eaae8ab10 Mon Sep 17 00:00:00 2001 From: Moe Date: Fri, 17 Jun 2022 13:49:16 -0700 Subject: [PATCH] Fix Order Streams in Live Grid --- web/assets/js/bs5.liveGrid.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/web/assets/js/bs5.liveGrid.js b/web/assets/js/bs5.liveGrid.js index b0a06210..6f496645 100644 --- a/web/assets/js/bs5.liveGrid.js +++ b/web/assets/js/bs5.liveGrid.js @@ -238,18 +238,15 @@ function drawLiveGridBlock(monitorConfig,subStreamChannel){ var height = width; var isSmallMobile = isMobile && window.innerWidth <= 812; var html = buildLiveGridBlock(monitorConfig) - if($user.details && $user.details.monitorOrder && $user.details.monitorOrder[monitorConfig.ke+''+monitorId]){ + var monitorOrderEngaged = dashboardOptions().switches.monitorOrder === 1; + if(monitorOrderEngaged && $user.details.monitorOrder && $user.details.monitorOrder[monitorConfig.ke+''+monitorId]){ var saved = $user.details.monitorOrder[monitorConfig.ke+''+monitorId]; x = saved.x; y = saved.y; width = saved.width; height = saved.height; } - var autoPlacement = false - if(dashboardOptions().switches.monitorOrder !== 1){ - autoPlacement = true - } - liveGrid.data('gridstack').addWidget($(html), x, y, isSmallMobile ? 4 : height, isSmallMobile ? 4 : height, autoPlacement); + liveGrid.data('gridstack').addWidget($(html), x, y, isSmallMobile ? 4 : height, isSmallMobile ? 4 : height, !monitorOrderEngaged); var theBlock = $('#monitor_live_' + monitorId); var streamElement = theBlock.find('.stream-element') liveGridElements[monitorId] = {