msDestiny14 4 lat temu
rodzic
commit
89739fe84b

+ 3 - 3
guiEditor/src/guiEditor.ts

@@ -8,7 +8,7 @@ import { Observable } from "babylonjs/Misc/observable";
 /**
  * Interface used to specify creation options for the gui editor
  */
-export interface IGuiEditorOptions {
+export interface IGUIEditorOptions {
     hostElement?: HTMLElement;
     customSave?: { label: string; action: (data: string) => Promise<void> };
     customLoadObservable?: Observable<any>;
@@ -17,14 +17,14 @@ export interface IGuiEditorOptions {
 /**
  * Class used to create a gui editor
  */
-export class GuiEditor {
+export class GUIEditor {
     private static _CurrentState: GlobalState;
 
     /**
      * Show the gui editor
      * @param options defines the options to use to configure the gui editor
      */
-    public static Show(options: IGuiEditorOptions) {
+    public static Show(options: IGUIEditorOptions) {
         if (this._CurrentState) {
             var popupWindow = (Popup as any)["gui-editor"];
             if (popupWindow) {

+ 1 - 1
guiEditor/src/guiNodeTools.ts

@@ -7,7 +7,7 @@ import { Rectangle } from "babylonjs-gui/2D/controls/rectangle";
 import { Slider } from "babylonjs-gui/2D/controls/sliders/slider";
 import { TextBlock } from "babylonjs-gui/2D/controls/textBlock";
 
-export class GuiNodeTools {
+export class GUINodeTools {
     public static CreateControlFromString (data: string) {
         //TODO: Add more elements and create default values for certain types.
         let element;

+ 2 - 2
guiEditor/src/legacy/legacy.ts

@@ -1,9 +1,9 @@
-import { GuiEditor } from "../index";
+import { GUIEditor } from "../index";
 
 var globalObject = (typeof global !== 'undefined') ? global : ((typeof window !== 'undefined') ? window : undefined);
 if (typeof globalObject !== "undefined") {
     (<any>globalObject).BABYLON = (<any>globalObject).BABYLON || {};
-    (<any>globalObject).BABYLON.GuiEditor = GuiEditor;
+    (<any>globalObject).BABYLON.GuiEditor = GUIEditor;
 }
 
 export * from "../index";

+ 1 - 1
guiEditor/src/sharedComponents/checkBoxLineComponent.tsx

@@ -48,7 +48,7 @@ export class CheckBoxLineComponent extends React.Component<ICheckBoxLineComponen
             return true;
         }
 
-        if(nextProps.disabled !== !!nextState.isDisabled){
+        if(nextProps.disabled !== nextState.isDisabled){
             return true;
         }
         

+ 2 - 2
guiEditor/src/workbenchEditor.tsx

@@ -6,7 +6,7 @@ import { Portal } from "./portal";
 import { LogComponent } from "./components/log/logComponent";
 import { DataStorage } from "babylonjs/Misc/dataStorage";
 import { Nullable } from "babylonjs/types";
-import { GuiNodeTools } from "./guiNodeTools";
+import { GUINodeTools } from "./guiNodeTools";
 import { IEditorData } from "./nodeLocationInfo";
 import { WorkbenchComponent } from "./diagram/workbench";
 import { GUINode } from "./diagram/guiNode";
@@ -225,7 +225,7 @@ export class WorkbenchEditor extends React.Component<IGraphEditorProps, IGraphEd
     emitNewBlock(event: React.DragEvent<HTMLDivElement>) {
         var data = event.dataTransfer.getData("babylonjs-gui-node") as string;
 
-        let guiElement = GuiNodeTools.CreateControlFromString (data);
+        let guiElement = GUINodeTools.CreateControlFromString (data);
 
         let newGuiNode = this._workbenchCanvas.appendBlock(guiElement);