Skip to content

Commit 89c53db

Browse files
committed
remove an alert, change name of function
1 parent d2b9880 commit 89c53db

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

plotly/offline/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
iplot_mpl,
1212
plot,
1313
plot_mpl,
14-
downloadImage,
14+
download_notebook_image,
1515
)

plotly/offline/offline.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -509,11 +509,11 @@ def enable_mpl_offline(resize=False, strip_style=False,
509509
lambda fig: iplot_mpl(fig, resize, strip_style, verbose,
510510
show_link, link_text, validate))
511511

512-
def downloadImage(format='png', height=600, width=800,
512+
def download_notebook_image(format='png', height=600, width=800,
513513
filename='newplot'):
514514

515515
script = ('<script>'
516-
'function downloadimage(format, width, height,'
516+
'function downloadimage(format, height, width,'
517517
' filename) {{'
518518
'var elementsList = document.querySelectorAll(\'.code_cell\');'
519519
'var selected = null;'
@@ -534,11 +534,10 @@ def downloadImage(format='png', height=600, width=800,
534534
'var pre_div = new_list.slice(-1)[0];'
535535
'var p = document.getElementById(pre_div.parentElement.id);'
536536
'Plotly.downloadImage(p, {{format: format, height: height, '
537-
'width: width, filename: `filename}});'
537+
'width: width, filename: filename}});'
538538
'}}'
539539
'}}'
540540
'downloadimage(\'{format}\', {height}, {width}, \'{filename}\');'
541-
'alert(\'ran\');'
542541
'</script>'
543542
).format(format=format, height=height, width=width,
544543
filename=filename)

0 commit comments

Comments
 (0)