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,18 +50,21 @@ ...@@ -50,18 +50,21 @@
function checkIsReady() { function checkIsReady() {
var panelsRendered = page.evaluate(function() { var panelsRendered = page.evaluate(function() {
var panelCount = document.querySelectorAll('.panel').length; var panelCount = document.querySelectorAll('plugin-component').length;
return window.panelsRendered >= panelCount; return window.panelsRendered >= panelCount;
}); });
if (panelsRendered || totalWaitMs > timeoutMs) { if (panelsRendered || totalWaitMs > timeoutMs) {
var bb = page.evaluate(function () { 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 = { // reset viewport to render full page
top: bb.top, page.viewportSize = {
left: bb.left,
width: bb.width, width: bb.width,
height: bb.height 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