Skip to content

Commit 10d960b

Browse files
Dtphelan1Matthew Gramigna
authored and
Matthew Gramigna
committed
Basic throttling
1 parent 81e768c commit 10d960b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/react-minimap/react-minimap.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export class Minimap extends React.Component {
3838
this.init = this.init.bind(this);
3939
this.up = this.up.bind(this);
4040

41-
this.resize = _.throttle(this.synchronize, 100);
41+
this.resize = _.throttle(this.synchronize, 200);
4242

4343
this.state = {
4444
children: null,
@@ -333,7 +333,7 @@ export class Minimap extends React.Component {
333333
return (
334334
<div
335335
className={"minimap-container " + this.props.className}
336-
onScroll={this.synchronize}
336+
onScroll={this.resize}
337337
ref={(source) => {this.source = source;}}
338338
>
339339
<div className="minimap-children-wrapper">

0 commit comments

Comments
 (0)