Skip to content

Commit 3f86d32

Browse files
authored
Inspector: Fix panel buttons on mobile (mrdoob#31958)
1 parent 5baffdb commit 3f86d32

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

examples/jsm/inspector/ui/Profiler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export class Profiler {
4444
this.tabsContainer.className = 'profiler-tabs';
4545

4646
const controls = document.createElement( 'div' );
47-
controls.style.display = 'flex';
47+
controls.className = 'profiler-controls';
4848

4949
this.maximizeBtn = document.createElement( 'button' );
5050
this.maximizeBtn.id = 'maximize-btn';

examples/jsm/inspector/ui/Style.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,26 @@ export class Style {
137137
flex-shrink: 0;
138138
justify-content: space-between;
139139
align-items: stretch;
140+
141+
overflow-x: auto;
142+
overflow-y: hidden;
143+
width: calc(100% - 89px);
140144
}
141145
142146
.profiler-tabs {
143147
display: flex;
144148
}
145149
150+
.profiler-controls {
151+
display: flex;
152+
position: absolute;
153+
right: 0;
154+
top: 0;
155+
height: 38px;
156+
background: var(--profiler-header);
157+
border-bottom: 1px solid var(--profiler-border);
158+
}
159+
146160
.tab-btn {
147161
background: transparent;
148162
border: none;
@@ -391,7 +405,7 @@ export class Style {
391405
.graph-svg {
392406
width: 100%;
393407
height: 80px;
394-
background-color: #2a2a33;
408+
background-color: var(--profiler-header);
395409
border: 1px solid var(--profiler-border);
396410
border-radius: 4px;
397411
}

0 commit comments

Comments
 (0)