瀏覽代碼

Inspector - The console tab is now scrolling at bottom of the div for each message

Julian 8 年之前
父節點
當前提交
2ed52bbbca
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      inspector/src/tabs/ConsoleTab.ts

+ 2 - 0
inspector/src/tabs/ConsoleTab.ts

@@ -60,6 +60,7 @@ module INSPECTOR {
             this._bjsPanelContent.innerHTML = BABYLON.Tools.LogCache;
             BABYLON.Tools.OnNewCacheEntry = (entry: string) => {
                 this._bjsPanelContent.innerHTML += entry;
+                this._bjsPanelContent.scrollTop = this._bjsPanelContent.scrollHeight; 
             };
 
             // Testing
@@ -94,6 +95,7 @@ module INSPECTOR {
                 line.textContent += JSON.stringify(message) ;
                 line.classList.add('object')
             }
+            this._consolePanelContent.scrollTop = this._consolePanelContent.scrollHeight; 
         }
 
         private _addConsoleLog(...params : any[]) {