Commit 29f1c925 by Torkel Ödegaard Committed by GitHub

Merge pull request #13352 from amuraru/patch-2

Updated phantomjs render script to take full height screenshots
parents 176c8579 bd1f87ed
......@@ -50,19 +50,22 @@
function checkIsReady() {
var panelsRendered = page.evaluate(function() {
var panelCount = document.querySelectorAll('.panel').length;
var panelCount = document.querySelectorAll('plugin-component').length;
return window.panelsRendered >= panelCount;
});
if (panelsRendered || totalWaitMs > timeoutMs) {
var bb = page.evaluate(function () {
return document.getElementsByClassName("main-view")[0].getBoundingClientRect();
var container = document.getElementsByClassName("dashboard-container")
if (container.length == 0) {
container = document.getElementsByClassName("panel-container")
}
return container[0].getBoundingClientRect();
});
page.clipRect = {
top: bb.top,
left: bb.left,
width: bb.width,
// reset viewport to render full page
page.viewportSize = {
width: bb.width,
height: bb.height
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment