Skip to content

Commit 60fe0fe

Browse files
committed
Merge remote-tracking branch 'origin/master' into unified-hover-with-zero-outer-height
2 parents ed8430c + ed41980 commit 60fe0fe

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

devtools/test_dashboard/devtools.js

+17-3
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,16 @@ var fuse = new Fuse(mocks, {
178178
}]
179179
});
180180

181-
var searchBar = document.getElementById('mocks-search');
181+
var transformInput = document.getElementById('css-transform');
182+
var mockInput = document.getElementById('mocks-search');
182183
var mocksList = document.getElementById('mocks-list');
183184
var plotArea = document.getElementById('plots');
184185

185-
searchBar.addEventListener('keyup', debounce(searchMocks, 250));
186+
mockInput.addEventListener('keyup', debounce(searchMocks, 250));
187+
188+
transformInput.addEventListener('keyup', function(e) {
189+
plotArea.style.transform = e.target.value;
190+
});
186191

187192
function debounce(func, wait, immediate) {
188193
var timeout;
@@ -230,7 +235,16 @@ function searchMocks(e) {
230235

231236
var listWidth = mocksList.getBoundingClientRect().width;
232237
var plotAreaWidth = Math.floor(window.innerWidth - listWidth);
233-
plotArea.setAttribute('style', 'width: ' + plotAreaWidth + 'px;');
238+
239+
var allStyles = [
240+
'width: ' + plotAreaWidth + 'px;'
241+
];
242+
243+
if(transformInput.value !== '') {
244+
allStyles.push('transform: ' + transformInput.value + ';');
245+
}
246+
247+
plotArea.setAttribute('style', allStyles.join(' '));
234248
});
235249
}
236250

devtools/test_dashboard/index-strict.html

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<span id="reload-time"></span>
1414

1515
<input id="mocks-search" type="text" placeholder="mocks search" />
16+
<input id="css-transform" type="text" placeholder="css transform" />
1617
</header>
1718

1819
<section id="mocks-list"></section>

devtools/test_dashboard/index.html

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<span id="reload-time"></span>
1212

1313
<input id="mocks-search" type="text" placeholder="mocks search" />
14+
<input id="css-transform" type="text" placeholder="css transform" />
1415
</header>
1516

1617
<section id="mocks-list"></section>

0 commit comments

Comments
 (0)