Procházet zdrojové kódy

resolves #3741 merge conflict

After a refactoring the sidemenu-canvas css class disappeared so changed the code from #3741 to use the main-view class instead.
jimmyR před 10 roky
rodič
revize
d8bb7c3094
1 změnil soubory, kde provedl 9 přidání a 0 odebrání
  1. 9 0
      vendor/phantomjs/render.js

+ 9 - 0
vendor/phantomjs/render.js

@@ -49,6 +49,15 @@
       });
 
       if (canvas || tries === 1000) {
+        var bb = page.evaluate(function () { 
+          return document.getElementsByClassName("main-view")[0].getBoundingClientRect(); 
+        });
+          page.clipRect = {
+          top:    bb.top,
+          left:   bb.left,
+          width:  bb.width,
+          height: bb.height
+        };
         page.render(params.png);
         phantom.exit();
       }