Skip to content

Commit e9cdc6d

Browse files
committed
js: Rename nav_element to toolbar.
This was done in ipympl, so is easier to compare if the same here.
1 parent 7ccc2d2 commit e9cdc6d

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

lib/matplotlib/backends/web_backend/js/mpl.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,9 @@ mpl.figure.prototype._init_canvas = function () {
231231
mpl.figure.prototype._init_toolbar = function () {
232232
var fig = this;
233233

234-
var nav_element = $('<div/>');
235-
nav_element.attr('style', 'width: 100%');
236-
this.root.append(nav_element);
234+
var toolbar = $('<div/>');
235+
toolbar.attr('style', 'width: 100%');
236+
this.root.append(toolbar);
237237

238238
// Define a callback function for later on.
239239
function toolbar_event(event) {
@@ -275,15 +275,15 @@ mpl.figure.prototype._init_toolbar = function () {
275275
button.append(icon_img);
276276
button.append(tooltip_span);
277277

278-
nav_element.append(button);
278+
toolbar.append(button);
279279
}
280280

281281
var fmt_picker_span = $('<span/>');
282282

283283
var fmt_picker = $('<select/>');
284284
fmt_picker.addClass('mpl-toolbar-option ui-widget ui-widget-content');
285285
fmt_picker_span.append(fmt_picker);
286-
nav_element.append(fmt_picker_span);
286+
toolbar.append(fmt_picker_span);
287287
this.format_dropdown = fmt_picker[0];
288288

289289
for (var ind in mpl.extensions) {
@@ -305,7 +305,7 @@ mpl.figure.prototype._init_toolbar = function () {
305305
);
306306

307307
var status_bar = $('<span class="mpl-message"/>');
308-
nav_element.append(status_bar);
308+
toolbar.append(status_bar);
309309
this.message = status_bar[0];
310310
};
311311

lib/matplotlib/backends/web_backend/js/nbagg_mpl.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ mpl.figure.prototype.updated_canvas_event = function () {
9494
mpl.figure.prototype._init_toolbar = function () {
9595
var fig = this;
9696

97-
var nav_element = $('<div/>');
98-
nav_element.attr('style', 'width: 100%');
99-
this.root.append(nav_element);
97+
var toolbar = $('<div/>');
98+
toolbar.attr('style', 'width: 100%');
99+
this.root.append(toolbar);
100100

101101
// Define a callback function for later on.
102102
function toolbar_event(event) {
@@ -126,14 +126,14 @@ mpl.figure.prototype._init_toolbar = function () {
126126
);
127127
button.click(method_name, toolbar_event);
128128
button.mouseover(tooltip, toolbar_mouse_event);
129-
nav_element.append(button);
129+
toolbar.append(button);
130130
}
131131

132132
// Add the status bar.
133133
var status_bar = $(
134134
'<span class="mpl-message" style="text-align:right; float: right;"/>'
135135
);
136-
nav_element.append(status_bar);
136+
toolbar.append(status_bar);
137137
this.message = status_bar[0];
138138

139139
// Add the close button to the window.

0 commit comments

Comments
 (0)