From b5bfda5878fc3bb52246e6db638bce705994b833 Mon Sep 17 00:00:00 2001 From: sunag Date: Fri, 26 Sep 2025 14:51:10 -0300 Subject: [PATCH] fix panel buttons on mobile --- examples/jsm/inspector/ui/Profiler.js | 2 +- examples/jsm/inspector/ui/Style.js | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/examples/jsm/inspector/ui/Profiler.js b/examples/jsm/inspector/ui/Profiler.js index e3e1956b108db1..b5ac32ac17d95a 100644 --- a/examples/jsm/inspector/ui/Profiler.js +++ b/examples/jsm/inspector/ui/Profiler.js @@ -44,7 +44,7 @@ export class Profiler { this.tabsContainer.className = 'profiler-tabs'; const controls = document.createElement( 'div' ); - controls.style.display = 'flex'; + controls.className = 'profiler-controls'; this.maximizeBtn = document.createElement( 'button' ); this.maximizeBtn.id = 'maximize-btn'; diff --git a/examples/jsm/inspector/ui/Style.js b/examples/jsm/inspector/ui/Style.js index 9fe9862ff4d3af..6c9bfa28c84e0d 100644 --- a/examples/jsm/inspector/ui/Style.js +++ b/examples/jsm/inspector/ui/Style.js @@ -137,12 +137,26 @@ export class Style { flex-shrink: 0; justify-content: space-between; align-items: stretch; + + overflow-x: auto; + overflow-y: hidden; + width: calc(100% - 89px); } .profiler-tabs { display: flex; } +.profiler-controls { + display: flex; + position: absolute; + right: 0; + top: 0; + height: 38px; + background: var(--profiler-header); + border-bottom: 1px solid var(--profiler-border); +} + .tab-btn { background: transparent; border: none; @@ -391,7 +405,7 @@ export class Style { .graph-svg { width: 100%; height: 80px; - background-color: #2a2a33; + background-color: var(--profiler-header); border: 1px solid var(--profiler-border); border-radius: 4px; }