فهرست منبع

Fix DebugLayerTab enum

David Catuhe 5 سال پیش
والد
کامیت
250f37024f
2فایلهای تغییر یافته به همراه10 افزوده شده و 10 حذف شده
  1. 3 3
      inspector/src/components/actionTabs/actionTabsComponent.tsx
  2. 7 7
      src/Debug/debugLayer.ts

+ 3 - 3
inspector/src/components/actionTabs/actionTabsComponent.tsx

@@ -38,14 +38,14 @@ export class ActionTabsComponent extends React.Component<IActionTabsComponentPro
         super(props);
 
         let initialIndex = props.initialTab === undefined 
-            ? DebugLayerTab.PROPERTIES
+            ? DebugLayerTab.Properties
             : props.initialTab
 
         if (this.props.globalState) {
             const validationResutls = this.props.globalState.validationResults;
             if (validationResutls) {
                 if (validationResutls.issues.numErrors || validationResutls.issues.numWarnings) {
-                    initialIndex = DebugLayerTab.TOOLS;
+                    initialIndex = DebugLayerTab.Tools;
                 }
             }
         }
@@ -57,7 +57,7 @@ export class ActionTabsComponent extends React.Component<IActionTabsComponentPro
     componentDidMount() {
         if (this.props.globalState) {
             this._onSelectionChangeObserver = this.props.globalState.onSelectionChangedObservable.add((entity) => {
-                this.setState({ selectedEntity: entity, selectedIndex: DebugLayerTab.PROPERTIES });
+                this.setState({ selectedEntity: entity, selectedIndex: DebugLayerTab.Properties });
             });
 
             this._onTabChangedObserver = this.props.globalState.onTabChangedObservable.add(index => {

+ 7 - 7
src/Debug/debugLayer.ts

@@ -81,9 +81,9 @@ export interface IInspectorOptions {
      */
     inspectorURL?: string;
     /**
-     * Optional initial tab (default to DebugLayerTab.PROPERTIES)
+     * Optional initial tab (default to DebugLayerTab.Properties)
      */
-    initialTab?: DebugLayerTab.PROPERTIES;
+    initialTab?: DebugLayerTab.Properties;
 }
 
 declare module "../scene" {
@@ -119,23 +119,23 @@ export enum DebugLayerTab {
     /**
      * Properties tag (default)
      */
-    PROPERTIES = 0,
+    Properties = 0,
     /**
      * Debug tab
      */
-    DEBUG = 1,
+    Debug = 1,
     /**
      * Statistics tab
      */
-    STATISTICS = 2,
+    Statistics = 2,
     /**
      * Tools tab
      */
-    TOOLS = 3,
+    Tools = 3,
     /**
      * Settings tab
      */
-    SETTINGS = 4
+    Settings = 4
 }
 
 /**