* Trigger file download
(dataUrl: string, fileName: string)
| 187 | * Trigger file download |
| 188 | */ |
| 189 | function triggerDownload(dataUrl: string, fileName: string) { |
| 190 | const a = document.createElement('a'); |
| 191 | a.setAttribute('download', fileName); |
| 192 | a.setAttribute('href', dataUrl); |
| 193 | a.click(); |
| 194 | } |
| 195 | |
| 196 | /** |
| 197 | * Export flow diagram as image |