David Catuhe 6 лет назад
Родитель
Сommit
ae0dbff1e0
4 измененных файлов с 10 добавлено и 19 удалено
  1. 0 4
      Tools/Gulp/gulpfile.js
  2. 1 11
      gui/webpack.config.js
  3. 6 3
      inspector/src/Inspector.ts
  4. 3 1
      src/Loading/babylon.loadingScreen.ts

+ 0 - 4
Tools/Gulp/gulpfile.js

@@ -676,9 +676,6 @@ var buildExternalLibrary = function(library, settings, watch) {
 
                 let wpBuild = webpackStream(require(library.webpack), webpack);
 
-
-                console.log(outputDirectory);
-
                 let buildEvent = wpBuild
                     .pipe(gulp.dest(outputDirectory))
                     //back-compat
@@ -689,7 +686,6 @@ var buildExternalLibrary = function(library, settings, watch) {
                         cb();
                     }))
                     .pipe(rename(function(path) {
-                        console.log(path.basename);
                         //path.extname === ".js"
                         path.basename = path.basename.replace(".min", "")
                     })).pipe(gulp.dest(outputDirectory));

+ 1 - 11
gui/webpack.config.js

@@ -1,6 +1,5 @@
 const path = require('path');
 const webpack = require('webpack');
-const DtsBundleWebpack = require('dts-bundle-webpack');
 const CleanWebpackPlugin = require('clean-webpack-plugin');
 
 module.exports = {
@@ -17,8 +16,7 @@ module.exports = {
             amd: "babylonjs-gui",
             commonjs: "babylonjs-gui"
         },
-        umdNamedDefine: true,
-        //devtoolModuleFilenameTemplate: "[absolute-resource-path]"
+        umdNamedDefine: true
     },
     resolve: {
         extensions: [".js", '.ts']
@@ -57,14 +55,6 @@ module.exports = {
             path.resolve(__dirname, './src/**/*.js'),
             path.resolve(__dirname, './src/**/*.map')
         ]),
-        // moved out of here due to the way gulp works...
-        /*new DtsBundleWebpack({
-            name: "babylonjs-gui",
-            main: path.resolve(__dirname, '../dist/preview release/gui/build/index.d.ts'),
-            out: path.resolve(__dirname, '../dist/preview release/gui/babylon.gui.module.d.ts'),
-            baseDir: path.resolve(__dirname, '../dist/preview release/gui/build/'),
-            headerText: "BabylonJS GUI"
-        }),*/
         new webpack.WatchIgnorePlugin([
             /\.js$/,
             /\.d\.ts$/

+ 6 - 3
inspector/src/Inspector.ts

@@ -360,15 +360,18 @@ export class Inspector {
 
                 this._NewCanvasContainer = parentControl.ownerDocument!.createElement("div");
 
+                while (parentControl.childElementCount > 0) {
+                    var child = parentControl.childNodes[0];
+                    parentControl.removeChild(child);
+                    this._NewCanvasContainer.appendChild(child);
+                }
+
                 parentControl.appendChild(this._NewCanvasContainer);
-                parentControl.removeChild(canvas!);
-                this._NewCanvasContainer.appendChild(canvas!);
 
                 this._NewCanvasContainer.style.gridRow = "1";
                 this._NewCanvasContainer.style.gridColumn = "2";
                 this._NewCanvasContainer.style.width = "100%";
                 this._NewCanvasContainer.style.height = "100%";
-                this._NewCanvasContainer.style.display = "grid";
 
                 if (options.handleResize && scene) {
                     this._OnBeforeRenderObserver = scene.onBeforeRenderObservable.add(() => {

+ 3 - 1
src/Loading/babylon.loadingScreen.ts

@@ -131,7 +131,9 @@ module BABYLON {
                 if (!this._loadingDiv) {
                     return;
                 }
-                document.body.removeChild(this._loadingDiv);
+                if (this._loadingDiv.parentElement) {
+                    this._loadingDiv.parentElement.removeChild(this._loadingDiv);
+                }
                 window.removeEventListener("resize", this._resizeLoadingUI);
 
                 this._loadingDiv = null;