KyleKorndoerfer / BracketsUML

A Brackets extension that allows you to create PlantUML diagrams from within the editor
MIT License
14 stars 3 forks source link

Handle file download complete better #1

Closed KyleKorndoerfer closed 9 years ago

KyleKorndoerfer commented 9 years ago

Since the saving of the image is done asynchronously in a node module it invokes the .done() method before the file has been successfully downloaded. This causes problems when trying to refresh the preview panel and the image hasn't finished saving yet.

A quick hack was to introduce an arbitrary 3 second delay using setTimeout() to give the operation time to complete, but this is not the correct way to do it.