Forráskód Böngészése

Select mesh refresh scroll

QuentinRillet 7 éve
szülő
commit
fc9a175881

+ 5 - 3
inspector/src/details/PropertyLine.ts

@@ -217,9 +217,7 @@ module INSPECTOR {
         /** Replaces the default display with an input */
         private _displayInput(e) {
             // Remove the displayInput event listener
-            this._valueDiv.removeEventListener('click', this._displayInputHandler);
-
-            
+            this._valueDiv.removeEventListener('click', this._displayInputHandler);           
 
             // Set input value
             let valueTxt = this._valueDiv.textContent;
@@ -256,6 +254,10 @@ module INSPECTOR {
 
         // Returns the property name
         public get name(): string {
+            // let arrayName = Helpers.Capitalize(this._property.name).match(/[A-Z][a-z]+|[0-9]+/g)
+            // if (arrayName) {
+            //     return arrayName.join(" ");
+            // }
             return this._property.name;
         }
 

+ 4 - 0
inspector/src/helpers/Helpers.ts

@@ -195,5 +195,9 @@ module INSPECTOR {
             }
             return propertiesLines;
         }
+
+        public static Capitalize (str : string) : string {
+            return str.charAt(0).toUpperCase() + str.slice(1);
+        }
     }
 }

+ 1 - 0
inspector/src/tabs/PropertyTab.ts

@@ -100,6 +100,7 @@ module INSPECTOR{
                     node.active(false);
                 }
             }
+            item.getDiv().scrollIntoView();
             item.active(true);
         }
         

+ 4 - 0
inspector/src/tree/TreeItem.ts

@@ -162,5 +162,9 @@ module INSPECTOR {
                 this._div.classList.add('active');
             }
         }
+
+        public getDiv() {
+            return this._div;
+        }
     }
 }