Skip to content

Commit 90352e5

Browse files
committed
Remove RAF fallback from rangeslider
1 parent d2ed7a9 commit 90352e5

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/components/rangeslider/create_slider.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -221,16 +221,9 @@ module.exports = function createSlider(gd) {
221221
}
222222

223223
function setDataRange(dataMin, dataMax) {
224-
225-
if(window.requestAnimationFrame) {
226-
window.requestAnimationFrame(function() {
227-
Plotly.relayout(gd, 'xaxis.range', [dataMin, dataMax]);
228-
});
229-
} else {
230-
setTimeout(function() {
231-
Plotly.relayout(gd, 'xaxis.range', [dataMin, dataMax]);
232-
}, 16);
233-
}
224+
window.requestAnimationFrame(function() {
225+
Plotly.relayout(gd, 'xaxis.range', [dataMin, dataMax]);
226+
});
234227
}
235228

236229

0 commit comments

Comments
 (0)