Skip to content
This repository has been archived by the owner on Jul 21, 2021. It is now read-only.

Commit

Permalink
put back ability for "owner" of popup panel to resize it (regression …
Browse files Browse the repository at this point in the history
…from 878d4fa)
  • Loading branch information
gorhill committed Dec 2, 2017
1 parent 39b2f1d commit a4ad3a4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/logger-ui.js
Expand Up @@ -762,7 +762,7 @@ var popupManager = (function() {

var onResizeRequested = function() {
var popupBody = popup.contentWindow.document.body;
if ( popupBody.getAttribute('data-resize-popup') !== 'true' ) {
if ( popupBody.hasAttribute('data-resize-popup') === false ) {
return;
}
popupBody.removeAttribute('data-resize-popup');
Expand Down
7 changes: 7 additions & 0 deletions src/js/popup.js
Expand Up @@ -56,6 +56,10 @@
}
})();

var popupWasResized = function() {
document.body.setAttribute('data-resize-popup', '');
};

var resizePopup = (function() {
var timer;
var fix = function() {
Expand All @@ -73,6 +77,7 @@ var resizePopup = (function() {
'hConstrained',
window.innerWidth < document.body.clientWidth
);
popupWasResized();
};
return function() {
if ( timer !== undefined ) {
Expand Down Expand Up @@ -371,6 +376,7 @@ function toggleCollapseState(elem) {
} else {
toggleSpecificCollapseState(elem);
}
popupWasResized();
}

function toggleMainCollapseState(uelem) {
Expand Down Expand Up @@ -449,6 +455,7 @@ function updateMatrixColors() {
expandos = expandosFromNode(cell);
addCellClass(cell, expandos.hostname, expandos.reqType);
}
popupWasResized();
}

/******************************************************************************/
Expand Down

0 comments on commit a4ad3a4

Please sign in to comment.