Skip to content

Commit f44ad45

Browse files
committed
remove old scripts replaced by function calls
1 parent e60a5dd commit f44ad45

File tree

1 file changed

+0
-37
lines changed

1 file changed

+0
-37
lines changed

plotly/offline/offline.py

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -291,27 +291,6 @@ def iplot(figure_or_data, show_link=True, link_text='Export to plot.ly',
291291
'Plotly image servers. Type help(\'py.image\') '
292292
'for more details.', UserWarning)
293293
# Write script to download image of the plot
294-
script = ('<script>'
295-
'function downloadimage(format, height, width,'
296-
' filename) {{'
297-
'var p = document.getElementById(\'{plot_id}\');'
298-
'Plotly.downloadImage(p, {{format: format, height: height, '
299-
'width: width, filename: filename}});'
300-
'}};'
301-
'if(document.readyState == \'complete\') {{'
302-
'if(confirm(\'Do you want to save this image as '
303-
'{filename}.{format}?\\n\\n\\n\\n'
304-
'For higher resolution images and more export options, '
305-
'consider making requests to our image servers. Type: '
306-
'help(py.image) for more details.'
307-
'\')) {{'
308-
'downloadimage(\'{format}\', {height}, {width}, '
309-
'\'{filename}\');}}'
310-
'}}'
311-
'</script>'
312-
).format(format=image, width=image_width,
313-
height=image_height, filename=filename,
314-
plot_id=plotdivid)
315294
script = image_download_script('iplot').format(format=image,
316295
width=image_width,
317296
height=image_height,
@@ -437,22 +416,6 @@ def plot(figure_or_data,
437416
'for more details.', UserWarning)
438417

439418
# write the download script:
440-
script = ('<script>'
441-
'function downloadimage(format, height, width,'
442-
' filename) {{'
443-
'var p = document.getElementById(\'{plot_id}\');'
444-
'Plotly.downloadImage(p, {{format: format, height: '
445-
'height, width: width, filename: filename}});'
446-
'}};'
447-
'if(confirm(\'Do you want to save this image as '
448-
'{filename}.{format}?\')) {{'
449-
'downloadimage(\'{format}\', {height}, {width}, '
450-
'\'{filename}\');}}'
451-
'</script>'
452-
).format(format=image, width=image_width,
453-
height=image_height,
454-
filename=image_filename, plot_id=plotdivid)
455-
456419
script = image_download_script('plot')
457420
script = script.format(format=image,
458421
width=image_width,

0 commit comments

Comments
 (0)