diff --git a/.jshintrc b/.jshintrc index 70723013..d1f0d584 100644 --- a/.jshintrc +++ b/.jshintrc @@ -24,6 +24,7 @@ "globals": { "iceStudio":false, "Icestudio":false, + "iceStudioReady":false, "domCache":false, "iprof":false, "IceProfiler":false, diff --git a/app/scripts/app.js b/app/scripts/app.js index 3ec987f6..1b59ad17 100644 --- a/app/scripts/app.js +++ b/app/scripts/app.js @@ -230,12 +230,13 @@ async function initAfterLoad() { $("#main-icestudio-load-wrapper").addClass("fade-loaded"); $("#main-icestudio-wrapper").addClass("loaded"); -angular.element(document).ready(function() { + angular.element(document).ready(function() { - $("#main-icestudio-load-wrapper").addClass("loaded"); - $("#main-icestudio-load-wrapper").removeClass("fade-loaded"); - iceStudioReady=true; -}); + $("#main-icestudio-load-wrapper").addClass("loaded"); + $("#main-icestudio-load-wrapper").removeClass("fade-loaded"); + iceStudioReady=true; + }); } + //-- Remove loaders when app is fully loaded initAfterLoad(); diff --git a/app/scripts/services/project.js b/app/scripts/services/project.js index 914b7811..bd5f726e 100644 --- a/app/scripts/services/project.js +++ b/app/scripts/services/project.js @@ -58,11 +58,12 @@ angular.module('icestudio') this.waitForIcestudioReady=function(){ - if(iceStudioReady) return true; - + if(iceStudioReady){ + return true; + } return false; - } + }; this.open = function (filepath, emptyPath) { let _this=this; utils.beginBlockingTask();