فهرست منبع

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[]) {