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