Skip to content

Commit d3468e8

Browse files
committed
Add scroll event handling to javascript
Conflicts: lib/matplotlib/backends/web_backend/mpl.js
1 parent 1a1b82d commit d3468e8

File tree

1 file changed

+5
-1
lines changed
  • lib/matplotlib/backends/web_backend

1 file changed

+5
-1
lines changed

lib/matplotlib/backends/web_backend/mpl.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,7 @@ mpl.findpos = function(e) {
414414
};
415415

416416
mpl.figure.prototype.mouse_event = function(event, name) {
417+
417418
var canvas_pos = mpl.findpos(event)
418419

419420
if (name === 'button_press')
@@ -425,7 +426,10 @@ mpl.figure.prototype.mouse_event = function(event, name) {
425426
var x = canvas_pos.x;
426427
var y = canvas_pos.y;
427428

428-
this.send_message(name, {x: x, y: y, button: event.button});
429+
console.log(name);
430+
431+
this.send_message(name, {x: x, y: y, button: event.button,
432+
step: event.step});
429433

430434
/* This prevents the web browser from automatically changing to
431435
* the text insertion cursor when the button is pressed. We want

0 commit comments

Comments
 (0)