@@ -143,7 +143,7 @@ mpl.figure.prototype._init_canvas = function() {
143143 // Throttle sequential mouse events to 1 every 20ms.
144144 rubberband . mousemove ( 'motion_notify' , mouse_event_fn ) ;
145145
146- < << << << HEAD
146+
147147 rubberband . mouseenter ( 'figure_enter' , mouse_event_fn ) ;
148148 rubberband . mouseleave ( 'figure_leave' , mouse_event_fn ) ;
149149
@@ -153,31 +153,6 @@ mpl.figure.prototype._init_canvas = function() {
153153 event . step = event . deltaY / 3.
154154 mouse_event_fn ( event ) ;
155155 } ) ;
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
181156
182157 canvas_div . append ( canvas ) ;
183158 canvas_div . append ( rubberband ) ;
@@ -463,11 +438,14 @@ mpl.figure.prototype.mouse_event = function(event, name) {
463438 var x = canvas_pos . x ;
464439 var y = canvas_pos . y ;
465440
441+ < << << << HEAD
466442<< << << < HEAD
467443= = === ==
468444 console . log ( name ) ;
469445
470446> >>> >>> b1331ff . . . Add scroll event handling to javascript
447+ === = ===
448+ > >>> > >> 6 b3ae27 ... Remove debug print
471449 this . send_message ( name , { x : x , y : y , button : event . button ,
472450 step : event . step } ) ;
473451
0 commit comments