1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-10-04 16:47:15 +02:00

code review of fix #3038

This commit is contained in:
gorhill 2017-09-19 23:25:08 -04:00
parent 83a791f4d1
commit e9beccba51
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -528,19 +528,19 @@ var renderOnce = function() {
lpane = uDom.nodeFromSelector('#panes > div:last-of-type');
var fillViewport = function() {
lpane.style.setProperty(
'height',
Math.max(
var newHeight = Math.max(
window.innerHeight - uDom.nodeFromSelector('#appinfo').offsetHeight,
rpane.offsetHeight
) + 'px'
);
if ( newHeight !== lpane.offsetHeight ) {
lpane.style.setProperty('height', newHeight + 'px');
}
// https://github.com/gorhill/uBlock/issues/3038
// - Resize the firewall pane while minding the space between the panes.
lpane.style.setProperty(
'width',
(window.offsetWidth - panes.offsetWidth + lpane.offsetWidth) + 'px'
);
var newWidth = window.innerWidth - panes.offsetWidth + lpane.offsetWidth;
if ( newWidth !== lpane.offsetWidth ) {
lpane.style.setProperty('width', newWidth + 'px');
}
};
// https://github.com/gorhill/uBlock/issues/2274