Skip to content

Commit 3cf0f55

Browse files
committed
Add scrolling to dashboard plot-area div for oversized plots
1 parent 208fd0b commit 3cf0f55

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

devtools/test_dashboard/devtools.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ searchBar.addEventListener('keyup', function(e) {
153153

154154
mocksList.appendChild(result);
155155

156-
var listWidth = mocksList.getBoundingClientRect.width;
157-
plotArea.setAttribute('width', window.innerWidth - listWidth);
156+
var listWidth = mocksList.getBoundingClientRect().width;
157+
var plotAreaWidth = Math.floor(window.innerWidth - listWidth);
158+
plotArea.setAttribute('style', 'width: ' + plotAreaWidth + 'px;');
158159
});
159160
});

devtools/test_dashboard/style.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,8 @@ header span{
5757
background-color: #4983EC;
5858
}
5959
#plots{
60-
width: 100%;
60+
overflow: scroll;
6161
}
6262
.dashboard-plot{
6363
margin-bottom: 30px;
64-
max-width: 940px;
6564
}

0 commit comments

Comments
 (0)