File tree 2 files changed +8
-11
lines changed
2 files changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -55,17 +55,15 @@ modeBarButtons.toImage = {
55
55
return ;
56
56
}
57
57
58
- if ( gd . _snapshotInProgress ) {
59
- Lib . notifier ( 'Snapshotting is still in progress - please hold' , 'long' ) ;
60
- return ;
61
- }
62
-
63
- gd . _snapshotInProgress = true ;
64
58
Lib . notifier ( 'Taking snapshot - this may take a few seconds' , 'long' ) ;
65
59
66
- downloadImage ( gd ) . catch ( function ( ) {
67
- Lib . notifier ( 'Sorry there was a problem downloading your snapshot' , 'long' ) ;
68
- } ) ;
60
+ downloadImage ( gd )
61
+ . then ( function ( filename ) {
62
+ Lib . notifier ( 'Snapshot succeeded - ' + filename ) ;
63
+ } )
64
+ . catch ( function ( err ) {
65
+ Lib . notifier ( 'Sorry there was a problem downloading your snapshot' , 'long' ) ;
66
+ } ) ;
69
67
}
70
68
} ;
71
69
Original file line number Diff line number Diff line change @@ -30,8 +30,7 @@ function downloadImage(gd, opts) {
30
30
31
31
return new Promise ( function ( resolve , reject ) {
32
32
if ( gd . _snapshotInProgress ) {
33
- reject ( new Error ( 'Snapshotting is unavailable in Internet Explorer. ' +
34
- 'Consider exporting your images using the Plotly Cloud' ) ) ;
33
+ reject ( new Error ( 'Snapshotting already in progress.' ) ) ;
35
34
}
36
35
37
36
gd . _snapshotInProgress = true ;
You can’t perform that action at this time.
0 commit comments