fix(image rendering): fixed issue with image rendering, fixes #3804

This commit is contained in:
Torkel Ödegaard 2016-01-21 10:10:12 +01:00
parent f2ce8f266b
commit 4a8f82ca9b
4 changed files with 59 additions and 48 deletions

View File

@ -13,6 +13,7 @@
min-height: 100%;
z-index: 101;
transform: translate3d(-100%, 0, 0);
visibility: hidden;
a:focus {
text-decoration: none;

View File

@ -56,6 +56,7 @@
</script>
<!-- build:js [[.AppSubUrl]]/public/app/boot.js -->
<script src="[[.AppSubUrl]]/public/vendor/npm/es5-shim/es5-shim.js"></script>
<script src="[[.AppSubUrl]]/public/vendor/npm/es6-shim/es6-shim.js"></script>
<script src="[[.AppSubUrl]]/public/vendor/npm/es6-promise/dist/es6-promise.js"></script>
<script src="[[.AppSubUrl]]/public/vendor/npm/systemjs/dist/system.src.js"></script>

View File

@ -28,6 +28,7 @@ module.exports = function(config) {
js: {
src: [
'<%= genDir %>/vendor/npm/es6-shim/es5-shim.js',
'<%= genDir %>/vendor/npm/es6-shim/es6-shim.js',
'<%= genDir %>/vendor/npm/es6-promise/es6-promise.js',
'<%= genDir %>/vendor/npm/systemjs/dist/system.js',

View File

@ -1,3 +1,6 @@
(function() {
'use strict';
var page = require('webpage').create();
var args = require('system').args;
var params = {};
@ -30,13 +33,18 @@ page.viewportSize = {
var tries = 0;
page.open(params.url, function (status) {
console.log('Loading a web page: ' + params.url);
console.log('Loading a web page: ' + params.url + ' status: ' + status);
function checkIsReady() {
var canvas = page.evaluate(function() {
var body = angular.element(document.body); // 1
var rootScope = body.scope().$root;
var panelsToLoad = angular.element('div.panel').length;
if (!window.angular) { return false; }
var body = window.angular.element(document.body); // 1
if (!body.scope) { return false; }
var rootScope = body.scope();
if (!rootScope) {return false;}
if (!rootScope.performance) { return false; }
var panelsToLoad = window.angular.element('div.panel').length;
return rootScope.performance.panelsRendered >= panelsToLoad;
});
@ -51,5 +59,5 @@ page.open(params.url, function (status) {
}
setTimeout(checkIsReady, 200);
});
})();