Update render.js

This commit is contained in:
Adrian Muraru 2018-09-19 19:36:56 +03:00 committed by GitHub
parent dbcd242b09
commit ba4d5ddaaa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,7 +56,11 @@
if (panelsRendered || totalWaitMs > timeoutMs) {
var bb = page.evaluate(function () {
return document.getElementsByClassName("dashboard-container")[0].getBoundingClientRect();
var container = document.getElementsByClassName("dashboard-container")
if (container.length == 0) {
container = document.getElementsByClassName("panel-container")
}
return container[0].getBoundingClientRect();
});
// reset viewport to render full page