Trying to completely get rid of jiggling montage layout (montage.js)
parent
915b706c6f
commit
5fdac67540
|
@ -840,6 +840,9 @@ function initPage() {
|
||||||
const observer = new ResizeObserver((objResizes) => {
|
const observer = new ResizeObserver((objResizes) => {
|
||||||
const blockContent = document.getElementById('content');
|
const blockContent = document.getElementById('content');
|
||||||
const currentScrollBbarExists = blockContent.scrollHeight > blockContent.clientHeight;
|
const currentScrollBbarExists = blockContent.scrollHeight > blockContent.clientHeight;
|
||||||
|
if (scrollBbarExists === null) {
|
||||||
|
scrollBbarExists = currentScrollBbarExists;
|
||||||
|
}
|
||||||
if (currentScrollBbarExists != scrollBbarExists) {
|
if (currentScrollBbarExists != scrollBbarExists) {
|
||||||
scrollBbarExists = currentScrollBbarExists;
|
scrollBbarExists = currentScrollBbarExists;
|
||||||
return;
|
return;
|
||||||
|
@ -900,12 +903,12 @@ function addEvents(grid, id) {
|
||||||
//let g = (id !== undefined ? 'grid' + id + ' ' : '');
|
//let g = (id !== undefined ? 'grid' + id + ' ' : '');
|
||||||
grid.on('change', function(event, items) {
|
grid.on('change', function(event, items) {
|
||||||
/* Occurs when widgets change their position/size due to constrain or direct changes */
|
/* Occurs when widgets change their position/size due to constrain or direct changes */
|
||||||
items.forEach(function(item) {
|
//items.forEach(function(item) {
|
||||||
const currentMonitorId = stringToNumber(item.id); //We received the ID of the monitor whose size was changed
|
// const currentMonitorId = stringToNumber(item.id); //We received the ID of the monitor whose size was changed
|
||||||
//setTriggerChangedMonitors(currentMonitorId);
|
// //setTriggerChangedMonitors(currentMonitorId);
|
||||||
//monitorsSetScale(currentMonitorId);
|
// //monitorsSetScale(currentMonitorId);
|
||||||
setTriggerChangedMonitors(currentMonitorId);
|
// setTriggerChangedMonitors(currentMonitorId);
|
||||||
});
|
//});
|
||||||
|
|
||||||
elementResize();
|
elementResize();
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue