Przeglądaj źródła

fix(rendering): fixed issue with phantomjs panel rendering

Torkel Ödegaard 9 lat temu
rodzic
commit
dd494e648a

+ 4 - 8
public/app/features/panel/partials/soloPanel.html

@@ -1,9 +1,5 @@
-<div class="main">
-	<div class="row-fluid">
-		<div class="span12">
-			<div class="panel nospace" ng-if="panel" style="width: 100%">
-				<plugin-component type="panel">
-				</plugin-component>
-			</div>
-		</div>
+<div class="panel nospace" ng-if="panel" style="width: 100%">
+	<plugin-component type="panel">
+	</plugin-component>
 </div>
+<div class="clearfix"></div>

+ 3 - 1
vendor/phantomjs/render.js

@@ -39,7 +39,8 @@
       var canvas = page.evaluate(function() {
         if (!window.angular) { return false; }
         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');
         if (!rootScope) {return false;}
@@ -59,6 +60,7 @@
           width:  bb.width,
           height: bb.height
         };
+
         page.render(params.png);
         phantom.exit();
       }