Skip to content
Snippets Groups Projects
Unverified Commit 16c10790 authored by Alexander Polyankin's avatar Alexander Polyankin Committed by GitHub
Browse files

Fix dashboard printing (#24585)

parent d4c03209
No related branches found
No related tags found
No related merge requests found
......@@ -84,6 +84,11 @@ export default ({ selector, wrapped, refreshMode = "throttle" } = {}) =>
this._refreshMode = nextMode;
};
_updateSizeAndRefreshMode = () => {
this._updateRefreshMode();
this._updateSize();
};
// ResizeObserver, ensure re-layout when container element changes size
_initResizeObserver() {
this._currentElement = this._getElement();
......@@ -107,13 +112,13 @@ export default ({ selector, wrapped, refreshMode = "throttle" } = {}) =>
_initMediaQueryListener() {
this._printMediaQuery?.addEventListener(
"change",
this._updateRefreshMode,
this._updateSizeAndRefreshMode,
);
}
_teardownQueryMediaListener() {
this._printMediaQuery?.removeEventListener(
"change",
this._updateRefreshMode,
this._updateSizeAndRefreshMode,
);
}
......
......@@ -9,6 +9,17 @@ html {
width: 100%;
}
@media print and (orientation: portrait) {
html {
width: 8.5in;
}
}
@media print and (orientation: landscape) {
html {
width: 11in;
}
}
body {
font-family: var(--default-font-family), sans-serif;
font-size: var(--default-font-size);
......
......@@ -293,17 +293,6 @@
}
}
@media print and (orientation: portrait) {
html {
width: 8.5in;
}
}
@media print and (orientation: landscape) {
html {
width: 11in;
}
}
@page {
margin: 1cm;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment