@@ -46,7 +46,6 @@ mpl.figure = function(figure_id, websocket, ondownload, parent_element) {
4646 this . _root_extra_style ( this . root )
4747 this . root . attr ( 'style' , 'display: inline-block' ) ;
4848
49- this . parent_element = parent_element
5049 $ ( parent_element ) . append ( this . root ) ;
5150
5251 this . _init_header ( this ) ;
@@ -96,6 +95,7 @@ mpl.figure.prototype._init_header = function() {
9695}
9796
9897
98+
9999mpl . figure . prototype . _canvas_extra_style = function ( canvas_div ) {
100100
101101}
@@ -142,27 +142,9 @@ mpl.figure.prototype._init_canvas = function() {
142142 // Throttle sequential mouse events to 1 every 20ms.
143143 rubberband . mousemove ( 'motion_notify' , mouse_event_fn ) ;
144144
145- < << << << HEAD
146145 rubberband . mouseenter ( 'figure_enter' , mouse_event_fn ) ;
147146 rubberband . mouseleave ( 'figure_leave' , mouse_event_fn ) ;
148- = === ===
149- function scroll_fn ( event ) {
150- event [ 'data' ] = 'scroll'
151- // http://www.adomas.org/javascript-mouse-wheel/
152- if ( event . wheelDelta ) { /* IE/Opera. */
153- event . step = event . wheelDelta / 120 ;
154- } else if ( event . detail ) { /** Mozilla case. */
155- /** In Mozilla, sign of delta is different than in IE.
156- * Also, delta is multiple of 3.
157- */
158- event . step = - event . detail / 3 ;
159- }
160- mouse_event_fn ( event ) ;
161- }
162147
163- $ ( canvas_div ) [ 0 ] . addEventListener ( 'DOMMouseScroll' , scroll_fn , false ) ;
164- $ ( canvas_div ) [ 0 ] . addEventListener ( 'mousewheel' , scroll_fn , false ) ;
165- > >>> >>> 2335705. . . Remove debug prints
166148
167149 canvas_div . append ( canvas ) ;
168150 canvas_div . append ( rubberband ) ;
0 commit comments