Преглед изворни кода

Bugfix : Do not add a loading screen if there is already one

Temechon пре 9 година
родитељ
комит
5c40e1dd8a
1 измењених фајлова са 4 додато и 0 уклоњено
  1. 4 0
      src/Tools/babylon.loadingScreen.ts

+ 4 - 0
src/Tools/babylon.loadingScreen.ts

@@ -19,6 +19,10 @@ module BABYLON {
 		}
 		
 		public displayLoadingUI(): void {
+            if (this._loadingDiv) {
+                // Do not add a loading screen if there is already one
+                return;
+            }
 			this._loadingDiv = document.createElement("div");
 
 		    this._loadingDiv.id = "babylonjsLoadingDiv";