@@ -98,13 +98,13 @@ mpl.figure.prototype.close_ws = function (fig, msg) {
9898 // fig.ws.close()
9999} ;
100100
101- mpl . figure . prototype . push_to_output = function ( _remove_interactive ) {
102- // Turn the data on the canvas into data in the output cell.
103- var width = this . canvas . width / this . ratio ;
104- var dataURL = this . canvas . toDataURL ( ) ;
105- this . cell_info [ 1 ] [ 'text/html' ] =
106- '<img src="' + dataURL + '" width="' + width + '">' ;
107- } ;
101+ // mpl.figure.prototype.push_to_output = function (_remove_interactive) {
102+ // // Turn the data on the canvas into data in the output cell.
103+ // var width = this.canvas.width / this.ratio;
104+ // var dataURL = this.canvas.toDataURL();
105+ // this.cell_info[1]['text/html'] =
106+ // '<img src="' + dataURL + '" width="' + width + '">';
107+ // };
108108
109109mpl . figure . prototype . updated_canvas_event = function ( ) {
110110 // Tell IPython that the notebook contents must change.
@@ -118,86 +118,86 @@ mpl.figure.prototype.updated_canvas_event = function () {
118118 } , 1000 ) ;
119119} ;
120120
121- mpl . figure . prototype . _init_toolbar = function ( ) {
122- var fig = this ;
123-
124- var toolbar = document . createElement ( 'div' ) ;
125- toolbar . classList = 'btn-toolbar' ;
126- this . root . appendChild ( toolbar ) ;
127-
128- function on_click_closure ( name ) {
129- return function ( _event ) {
130- return fig . toolbar_button_onclick ( name ) ;
131- } ;
132- }
133-
134- function on_mouseover_closure ( tooltip ) {
135- return function ( event ) {
136- if ( ! event . currentTarget . disabled ) {
137- return fig . toolbar_button_onmouseover ( tooltip ) ;
138- }
139- } ;
140- }
141-
142- fig . buttons = { } ;
143- var buttonGroup = document . createElement ( 'div' ) ;
144- buttonGroup . classList = 'btn-group' ;
145- var button ;
146- for ( var toolbar_ind in mpl . toolbar_items ) {
147- var name = mpl . toolbar_items [ toolbar_ind ] [ 0 ] ;
148- var tooltip = mpl . toolbar_items [ toolbar_ind ] [ 1 ] ;
149- var image = mpl . toolbar_items [ toolbar_ind ] [ 2 ] ;
150- var method_name = mpl . toolbar_items [ toolbar_ind ] [ 3 ] ;
151-
152- if ( ! name ) {
153- /* Instead of a spacer, we start a new button group. */
154- if ( buttonGroup . hasChildNodes ( ) ) {
155- toolbar . appendChild ( buttonGroup ) ;
156- }
157- buttonGroup = document . createElement ( 'div' ) ;
158- buttonGroup . classList = 'btn-group' ;
159- continue ;
160- }
161-
162- button = fig . buttons [ name ] = document . createElement ( 'button' ) ;
163- button . classList = 'btn btn-default' ;
164- button . href = '#' ;
165- button . title = name ;
166- button . innerHTML = '<i class="fa ' + image + ' fa-lg"></i>' ;
167- button . addEventListener ( 'click' , on_click_closure ( method_name ) ) ;
168- button . addEventListener ( 'mouseover' , on_mouseover_closure ( tooltip ) ) ;
169- buttonGroup . appendChild ( button ) ;
170- }
171-
172- if ( buttonGroup . hasChildNodes ( ) ) {
173- toolbar . appendChild ( buttonGroup ) ;
174- }
175-
176- // Add the status bar.
177- var status_bar = document . createElement ( 'span' ) ;
178- status_bar . classList = 'mpl-message pull-right' ;
179- toolbar . appendChild ( status_bar ) ;
180- this . message = status_bar ;
181-
182- // Add the close button to the window.
183- var buttongrp = document . createElement ( 'div' ) ;
184- buttongrp . classList = 'btn-group inline pull-right' ;
185- button = document . createElement ( 'button' ) ;
186- button . classList = 'btn btn-mini btn-primary' ;
187- button . href = '#' ;
188- button . title = 'Stop Interaction' ;
189- button . innerHTML = '<i class="fa fa-power-off icon-remove icon-large"></i>' ;
190- button . addEventListener ( 'click' , function ( _evt ) {
191- fig . handle_close ( fig , { } ) ;
192- } ) ;
193- button . addEventListener (
194- 'mouseover' ,
195- on_mouseover_closure ( 'Stop Interaction' )
196- ) ;
197- buttongrp . appendChild ( button ) ;
198- var titlebar = this . root . querySelector ( '.ui-dialog-titlebar' ) ;
199- titlebar . insertBefore ( buttongrp , titlebar . firstChild ) ;
200- } ;
121+ // mpl.figure.prototype._init_toolbar = function () {
122+ // var fig = this;
123+
124+ // var toolbar = document.createElement('div');
125+ // toolbar.classList = 'btn-toolbar';
126+ // this.root.appendChild(toolbar);
127+
128+ // function on_click_closure(name) {
129+ // return function (_event) {
130+ // return fig.toolbar_button_onclick(name);
131+ // };
132+ // }
133+
134+ // function on_mouseover_closure(tooltip) {
135+ // return function (event) {
136+ // if (!event.currentTarget.disabled) {
137+ // return fig.toolbar_button_onmouseover(tooltip);
138+ // }
139+ // };
140+ // }
141+
142+ // fig.buttons = {};
143+ // var buttonGroup = document.createElement('div');
144+ // buttonGroup.classList = 'btn-group';
145+ // var button;
146+ // for (var toolbar_ind in mpl.toolbar_items) {
147+ // var name = mpl.toolbar_items[toolbar_ind][0];
148+ // var tooltip = mpl.toolbar_items[toolbar_ind][1];
149+ // var image = mpl.toolbar_items[toolbar_ind][2];
150+ // var method_name = mpl.toolbar_items[toolbar_ind][3];
151+
152+ // if (!name) {
153+ // /* Instead of a spacer, we start a new button group. */
154+ // if (buttonGroup.hasChildNodes()) {
155+ // toolbar.appendChild(buttonGroup);
156+ // }
157+ // buttonGroup = document.createElement('div');
158+ // buttonGroup.classList = 'btn-group';
159+ // continue;
160+ // }
161+
162+ // button = fig.buttons[name] = document.createElement('button');
163+ // button.classList = 'btn btn-default';
164+ // button.href = '#';
165+ // button.title = name;
166+ // button.innerHTML = '<i class="fa ' + image + ' fa-lg"></i>';
167+ // button.addEventListener('click', on_click_closure(method_name));
168+ // button.addEventListener('mouseover', on_mouseover_closure(tooltip));
169+ // buttonGroup.appendChild(button);
170+ // }
171+
172+ // if (buttonGroup.hasChildNodes()) {
173+ // toolbar.appendChild(buttonGroup);
174+ // }
175+
176+ // // Add the status bar.
177+ // var status_bar = document.createElement('span');
178+ // status_bar.classList = 'mpl-message pull-right';
179+ // toolbar.appendChild(status_bar);
180+ // this.message = status_bar;
181+
182+ // // Add the close button to the window.
183+ // var buttongrp = document.createElement('div');
184+ // buttongrp.classList = 'btn-group inline pull-right';
185+ // button = document.createElement('button');
186+ // button.classList = 'btn btn-mini btn-primary';
187+ // button.href = '#';
188+ // button.title = 'Stop Interaction';
189+ // button.innerHTML = '<i class="fa fa-power-off icon-remove icon-large"></i>';
190+ // button.addEventListener('click', function (_evt) {
191+ // fig.handle_close(fig, {});
192+ // });
193+ // button.addEventListener(
194+ // 'mouseover',
195+ // on_mouseover_closure('Stop Interaction')
196+ // );
197+ // buttongrp.appendChild(button);
198+ // var titlebar = this.root.querySelector('.ui-dialog-titlebar');
199+ // titlebar.insertBefore(buttongrp, titlebar.firstChild);
200+ // };
201201
202202mpl . figure . prototype . _remove_fig_handler = function ( event ) {
203203 var fig = event . data . fig ;
0 commit comments