fix(panel): fixed issues with png rendering, also fixed #4260

This commit is contained in:
Torkel Ödegaard
2016-03-06 12:51:36 +01:00
parent 7df18678a4
commit 2c8e35a933
3 changed files with 7 additions and 5 deletions

View File

@@ -33,7 +33,7 @@
var tries = 0;
page.open(params.url, function (status) {
console.log('Loading a web page: ' + params.url + ' status: ' + status);
// console.log('Loading a web page: ' + params.url + ' status: ' + status);
function checkIsReady() {
var canvas = page.evaluate(function() {
@@ -49,10 +49,11 @@
});
if (canvas || tries === 1000) {
var bb = page.evaluate(function () {
return document.getElementsByClassName("main-view")[0].getBoundingClientRect();
var bb = page.evaluate(function () {
return document.getElementsByClassName("main-view")[0].getBoundingClientRect();
});
page.clipRect = {
page.clipRect = {
top: bb.top,
left: bb.left,
width: bb.width,