Browse Source

Updated phantomjs render script to take full height screenshots

Adrian Muraru 7 years ago
parent
commit
dbcd242b09
1 changed files with 7 additions and 1 deletions
  1. 7 1
      tools/phantomjs/render.js

+ 7 - 1
tools/phantomjs/render.js

@@ -56,8 +56,14 @@
 
         if (panelsRendered || totalWaitMs > timeoutMs) {
           var bb = page.evaluate(function () {
-            return document.getElementsByClassName("main-view")[0].getBoundingClientRect();
+            return document.getElementsByClassName("dashboard-container")[0].getBoundingClientRect();
           });
+          
+          // reset viewport to render full page
+          page.viewportSize = {
+            width: bb.width,
+            height: bb.height
+          };
 
           page.clipRect = {
             top:    bb.top,