Fix Order Streams in Live Grid

cron-as-worker-process
Moe 2022-06-17 13:49:16 -07:00
parent 98eba5b2eb
commit 0166fe5ad3
1 changed files with 3 additions and 6 deletions

View File

@ -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] = {