Commit 2c8e35a9 by Torkel Ödegaard

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

parent 7df18678
...@@ -72,6 +72,7 @@ function (angular, _, require, config) { ...@@ -72,6 +72,7 @@ function (angular, _, require, config) {
var soloUrl = $scope.shareUrl; var soloUrl = $scope.shareUrl;
soloUrl = soloUrl.replace('/dashboard/', '/dashboard-solo/'); soloUrl = soloUrl.replace('/dashboard/', '/dashboard-solo/');
soloUrl = soloUrl.replace("&fullscreen", "");
$scope.iframeHtml = '<iframe src="' + soloUrl + '" width="450" height="200" frameborder="0"></iframe>'; $scope.iframeHtml = '<iframe src="' + soloUrl + '" width="450" height="200" frameborder="0"></iframe>';
......
...@@ -38,7 +38,7 @@ define([ ...@@ -38,7 +38,7 @@ define([
ctx.scope.init(); ctx.scope.init();
var base = 'http://dashboards.grafana.com/render/dashboard-solo/db/my-dash'; var base = 'http://dashboards.grafana.com/render/dashboard-solo/db/my-dash';
var params = '?from=1000&to=2000&panelId=22&fullscreen&width=1000&height=500'; var params = '?from=1000&to=2000&panelId=22&width=1000&height=500';
expect(ctx.scope.imageUrl).to.be(base + params); expect(ctx.scope.imageUrl).to.be(base + params);
}); });
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
var tries = 0; var tries = 0;
page.open(params.url, function (status) { 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() { function checkIsReady() {
var canvas = page.evaluate(function() { var canvas = page.evaluate(function() {
...@@ -49,10 +49,11 @@ ...@@ -49,10 +49,11 @@
}); });
if (canvas || tries === 1000) { if (canvas || tries === 1000) {
var bb = page.evaluate(function () { var bb = page.evaluate(function () {
return document.getElementsByClassName("main-view")[0].getBoundingClientRect(); return document.getElementsByClassName("main-view")[0].getBoundingClientRect();
}); });
page.clipRect = {
page.clipRect = {
top: bb.top, top: bb.top,
left: bb.left, left: bb.left,
width: bb.width, width: bb.width,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment