@@ -143,7 +143,7 @@ mpl.figure.prototype._init_canvas = function() {
143
143
// Throttle sequential mouse events to 1 every 20ms.
144
144
rubberband . mousemove ( 'motion_notify' , mouse_event_fn ) ;
145
145
146
- < << << << HEAD
146
+
147
147
rubberband . mouseenter ( 'figure_enter' , mouse_event_fn ) ;
148
148
rubberband . mouseleave ( 'figure_leave' , mouse_event_fn ) ;
149
149
@@ -153,31 +153,6 @@ mpl.figure.prototype._init_canvas = function() {
153
153
event . step = event . deltaY / 3.
154
154
mouse_event_fn ( event ) ;
155
155
} ) ;
156
- = === ===
157
-
158
- rubberband . mouseenter ( 'figure_enter' , mouse_event_fn ) ;
159
- rubberband . mouseleave ( 'figure_leave' , mouse_event_fn ) ;
160
-
161
- function scroll_fn ( event ) {
162
- event [ 'data' ] = 'scroll'
163
- // http://www.adomas.org/javascript-mouse-wheel/
164
- if ( event . wheelDelta ) { /* IE/Opera. */
165
- event . step = event . wheelDelta / 120 ;
166
- } else if ( event . detail ) { /** Mozilla case. */
167
- /** In Mozilla, sign of delta is different than in IE.
168
- * Also, delta is multiple of 3.
169
- */
170
- event . step = - event . detail / 3 ;
171
- }
172
- mouse_event_fn ( event )
173
- }
174
- // Initialization code.
175
- if ( window . addEventListener )
176
- /** DOMMouseScroll is for mozilla. */
177
- window . addEventListener ( 'DOMMouseScroll' , scroll_fn , false ) ;
178
- /** IE/Opera. */
179
- window . onmousewheel = document . onmousewheel = scroll_fn ;
180
- > >>> >>> fe99b32 . . . Add scroll event handling to webagg backend
181
156
182
157
canvas_div . append ( canvas ) ;
183
158
canvas_div . append ( rubberband ) ;
@@ -463,11 +438,14 @@ mpl.figure.prototype.mouse_event = function(event, name) {
463
438
var x = canvas_pos . x ;
464
439
var y = canvas_pos . y ;
465
440
441
+ < << << << HEAD
466
442
<< << << < HEAD
467
443
= = === ==
468
444
console . log ( name ) ;
469
445
470
446
> >>> >>> b1331ff . . . Add scroll event handling to javascript
447
+ === = ===
448
+ > >>> > >> 6 b3ae27 ... Remove debug print
471
449
this . send_message ( name , { x : x , y : y , button : event . button ,
472
450
step : event . step } ) ;
473
451
0 commit comments