Explorar o código

Updated phantomjs render script to take full height screenshots

Adrian Muraru %!s(int64=7) %!d(string=hai) anos
pai
achega
dbcd242b09
Modificáronse 1 ficheiros con 7 adicións e 1 borrados
  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,