Skip to content

Commit 94a55f9

Browse files
committed
added confirm message to iplot mode
1 parent 1892ab6 commit 94a55f9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

plotly/offline/offline.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,11 @@ def iplot(figure_or_data, show_link=True, link_text='Export to plot.ly',
269269
'width: width, filename: filename}});'
270270
'}};'
271271
'if(document.readyState == \'complete\') {{'
272+
'if(confirm(\'Do you want to save this image as '
273+
'{filename}.{format}?\')) {{'
272274
'downloadimage(\'{format}\', {height}, {width}, '
273275
'\'{filename}\');}}'
276+
'}}'
274277
'</script>'
275278
).format(format=image, width=image_width,
276279
height=image_height, filename=filename,

0 commit comments

Comments
 (0)