浏览代码

Inspector - Fix header width in popup mode

Temechon 8 年之前
父节点
当前提交
247de40de3

+ 2 - 1
dist/preview release/inspector/babylon.inspector.css

@@ -269,7 +269,8 @@
     .insp-wrapper .insp-details .header-row {
       background-color: #2c2c2c;
       color: #ccc;
-      width: 100%; }
+      width: 100%;
+      max-width: 100%; }
       .insp-wrapper .insp-details .header-row > * {
         color: #ccc !important;
         padding: 5px 0 5px 5px !important;

+ 1 - 1
inspector/sass/_detailPanel.scss

@@ -71,7 +71,7 @@
     background-color: $background-lighter; 
     color           : $color;
     width           : 100%;
-    // Max-width is set in js
+    max-width       : 100%;
     
     // Special definition for text color: the color is the default one
     // All header columns

+ 0 - 4
inspector/src/details/DetailPanel.ts

@@ -37,10 +37,6 @@
             this._createHeaderRow();
             this._div.appendChild(this._headerRow);
             
-            Inspector.WINDOW.addEventListener('resize', (e) => {
-                // adapt the header row max width according to its parent size;
-                this._headerRow.style.maxWidth = this._headerRow.parentElement.clientWidth+'px';
-            });
         }
         
         /** Updates the HTML of the detail panel */