We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
capture_scroll
1 parent 31ae91d commit 3662170Copy full SHA for 3662170
src/mpl_widget.ts
@@ -544,6 +544,11 @@ export class MPLCanvasView extends DOMWidgetView {
544
this.model.get('pan_zoom_throttle')
545
)
546
);
547
+ top_canvas.addEventListener('wheel', (event: any) => {
548
+ if (this.model.get('capture_scroll')) {
549
+ event.preventDefault();
550
+ }
551
+ });
552
553
canvas_div.appendChild(canvas);
554
canvas_div.appendChild(top_canvas);
@@ -708,9 +713,6 @@ export class MPLCanvasView extends DOMWidgetView {
708
713
} else {
709
714
event.step = -1;
710
715
}
711
- if (this.model.get('capture_scroll')) {
712
- event.preventDefault();
- }
716
717
718
if (name === 'button_press') {
0 commit comments