File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 95
95
"babel-eslint" : " ^10.0.1" ,
96
96
"babel-jest" : " ^23.6.0" ,
97
97
"babel-loader" : " ^8.0.4" ,
98
- "codesandbox" : " ^ 1.2.10" ,
98
+ "codesandbox" : " ~ 1.2.10" ,
99
99
"coveralls" : " ^3.0.1" ,
100
100
"cross-env" : " ^5.1.6" ,
101
101
"enzyme" : " ^3.10.0" ,
Original file line number Diff line number Diff line change @@ -232,11 +232,15 @@ export default class DndManager {
232
232
return ;
233
233
}
234
234
235
- this . dragHover ( {
236
- node : draggedNode ,
237
- path : monitor . getItem ( ) . path ,
238
- minimumTreeIndex : dropTargetProps . listIndex ,
239
- depth : targetDepth ,
235
+ // throttle `dragHover` work to available animation frames
236
+ cancelAnimationFrame ( this . rafId ) ;
237
+ this . rafId = requestAnimationFrame ( ( ) => {
238
+ this . dragHover ( {
239
+ node : draggedNode ,
240
+ path : monitor . getItem ( ) . path ,
241
+ minimumTreeIndex : dropTargetProps . listIndex ,
242
+ depth : targetDepth ,
243
+ } ) ;
240
244
} ) ;
241
245
} ,
242
246
You can’t perform that action at this time.
0 commit comments