mirror of
https://github.com/grafana/grafana.git
synced 2024-11-26 10:50:37 -06:00
fix(rendering): fixed issue with phantomjs panel rendering
This commit is contained in:
parent
c9d6321f38
commit
dd494e648a
@ -1,9 +1,5 @@
|
|||||||
<div class="main">
|
<div class="panel nospace" ng-if="panel" style="width: 100%">
|
||||||
<div class="row-fluid">
|
<plugin-component type="panel">
|
||||||
<div class="span12">
|
</plugin-component>
|
||||||
<div class="panel nospace" ng-if="panel" style="width: 100%">
|
|
||||||
<plugin-component type="panel">
|
|
||||||
</plugin-component>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
4
vendor/phantomjs/render.js
vendored
4
vendor/phantomjs/render.js
vendored
@ -39,7 +39,8 @@
|
|||||||
var canvas = page.evaluate(function() {
|
var canvas = page.evaluate(function() {
|
||||||
if (!window.angular) { return false; }
|
if (!window.angular) { return false; }
|
||||||
var body = window.angular.element(document.body);
|
var body = window.angular.element(document.body);
|
||||||
if (!body.scope) { return false; }
|
if (!body.injector) { return false; }
|
||||||
|
if (!body.injector()) { return false; }
|
||||||
|
|
||||||
var rootScope = body.injector().get('$rootScope');
|
var rootScope = body.injector().get('$rootScope');
|
||||||
if (!rootScope) {return false;}
|
if (!rootScope) {return false;}
|
||||||
@ -59,6 +60,7 @@
|
|||||||
width: bb.width,
|
width: bb.width,
|
||||||
height: bb.height
|
height: bb.height
|
||||||
};
|
};
|
||||||
|
|
||||||
page.render(params.png);
|
page.render(params.png);
|
||||||
phantom.exit();
|
phantom.exit();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user