mirror of
https://github.com/gorhill/uMatrix.git
synced 2024-06-26 18:10:39 +12:00
put back ability for "owner" of popup panel to resize it (regression from 878d4fa6d5
)
This commit is contained in:
parent
39b2f1ddac
commit
a4ad3a4ea9
|
@ -762,7 +762,7 @@ var popupManager = (function() {
|
||||||
|
|
||||||
var onResizeRequested = function() {
|
var onResizeRequested = function() {
|
||||||
var popupBody = popup.contentWindow.document.body;
|
var popupBody = popup.contentWindow.document.body;
|
||||||
if ( popupBody.getAttribute('data-resize-popup') !== 'true' ) {
|
if ( popupBody.hasAttribute('data-resize-popup') === false ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
popupBody.removeAttribute('data-resize-popup');
|
popupBody.removeAttribute('data-resize-popup');
|
||||||
|
|
|
@ -56,6 +56,10 @@
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
var popupWasResized = function() {
|
||||||
|
document.body.setAttribute('data-resize-popup', '');
|
||||||
|
};
|
||||||
|
|
||||||
var resizePopup = (function() {
|
var resizePopup = (function() {
|
||||||
var timer;
|
var timer;
|
||||||
var fix = function() {
|
var fix = function() {
|
||||||
|
@ -73,6 +77,7 @@ var resizePopup = (function() {
|
||||||
'hConstrained',
|
'hConstrained',
|
||||||
window.innerWidth < document.body.clientWidth
|
window.innerWidth < document.body.clientWidth
|
||||||
);
|
);
|
||||||
|
popupWasResized();
|
||||||
};
|
};
|
||||||
return function() {
|
return function() {
|
||||||
if ( timer !== undefined ) {
|
if ( timer !== undefined ) {
|
||||||
|
@ -371,6 +376,7 @@ function toggleCollapseState(elem) {
|
||||||
} else {
|
} else {
|
||||||
toggleSpecificCollapseState(elem);
|
toggleSpecificCollapseState(elem);
|
||||||
}
|
}
|
||||||
|
popupWasResized();
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleMainCollapseState(uelem) {
|
function toggleMainCollapseState(uelem) {
|
||||||
|
@ -449,6 +455,7 @@ function updateMatrixColors() {
|
||||||
expandos = expandosFromNode(cell);
|
expandos = expandosFromNode(cell);
|
||||||
addCellClass(cell, expandos.hostname, expandos.reqType);
|
addCellClass(cell, expandos.hostname, expandos.reqType);
|
||||||
}
|
}
|
||||||
|
popupWasResized();
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
Loading…
Reference in a new issue