File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
NetworkDynamicsInspector/src Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -218,7 +218,6 @@ function Bonito.jsrender(session::Session, slider::ContinuousSlider)
218
218
return pos;
219
219
}
220
220
221
- // const move_thumb_throttled = Bonito.throttle_function(thumb_event, 100);
222
221
const controller = new AbortController ();
223
222
document .addEventListener (' mousedown' , function (e ) {
224
223
if (e .target === thumb_r){
@@ -247,11 +246,12 @@ function Bonito.jsrender(session::Session, slider::ContinuousSlider)
247
246
isDragging_r = false ;
248
247
isDragging_l = false ;
249
248
}, { signal: controller .signal });
249
+ const thumb_event_throttled = Bonito .throttle_function (thumb_event, 10 );
250
250
document .addEventListener (' mousemove' , function (e ) {
251
251
if (isDragging_r) {
252
- thumb_event (e, ' r' );
252
+ thumb_event_throttled (e, ' r' );
253
253
} else if (isDragging_l) {
254
- thumb_event (e, ' l' );
254
+ thumb_event_throttled (e, ' l' );
255
255
}
256
256
}, { signal: controller .signal });
257
257
set_thumb_val ($ (slider .value_l ).value , ' l' );
You can’t perform that action at this time.
0 commit comments