Trying to completely get rid of jiggling montage layout (montage.js)

pull/4032/head
IgorA100 2024-05-22 23:03:26 +03:00 committed by GitHub
parent 915b706c6f
commit 5fdac67540
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 6 deletions
web/skins/classic/views/js

View File

@ -840,6 +840,9 @@ function initPage() {
const observer = new ResizeObserver((objResizes) => {
const blockContent = document.getElementById('content');
const currentScrollBbarExists = blockContent.scrollHeight > blockContent.clientHeight;
if (scrollBbarExists === null) {
scrollBbarExists = currentScrollBbarExists;
}
if (currentScrollBbarExists != scrollBbarExists) {
scrollBbarExists = currentScrollBbarExists;
return;
@ -900,12 +903,12 @@ function addEvents(grid, id) {
//let g = (id !== undefined ? 'grid' + id + ' ' : '');
grid.on('change', function(event, items) {
/* Occurs when widgets change their position/size due to constrain or direct changes */
items.forEach(function(item) {
const currentMonitorId = stringToNumber(item.id); //We received the ID of the monitor whose size was changed
//setTriggerChangedMonitors(currentMonitorId);
//monitorsSetScale(currentMonitorId);
setTriggerChangedMonitors(currentMonitorId);
});
//items.forEach(function(item) {
// const currentMonitorId = stringToNumber(item.id); //We received the ID of the monitor whose size was changed
// //setTriggerChangedMonitors(currentMonitorId);
// //monitorsSetScale(currentMonitorId);
// setTriggerChangedMonitors(currentMonitorId);
//});
elementResize();
})