[Enhancement] Hide export buttons during export

Buttons temporarily hide until export completes.
This commit is contained in:
David Hudson
2016-09-02 20:41:38 +09:00
parent 3736f84c12
commit de85f79ab6
3 changed files with 28 additions and 7 deletions

View File

@ -373,21 +373,33 @@ define(
* Export the plot to PDF
*/
PlotController.prototype.exportPDF = function () {
this.ExportImageService.exportPDF(this.$element[0], "plot.pdf");
var self = this;
self.hideExportButtons = true;
self.ExportImageService.exportPDF(self.$element[0], "plot.pdf", function() {
self.hideExportButtons = false;
});
};
/**
* Export the plot to PNG
*/
PlotController.prototype.exportPNG = function () {
this.ExportImageService.exportPNG(this.$element[0], "plot.png");
var self = this;
self.hideExportButtons = true;
self.ExportImageService.exportPNG(self.$element[0], "plot.png", function() {
self.hideExportButtons = false;
});
};
/**
* Export the plot to JPG
*/
PlotController.prototype.exportJPG = function () {
this.ExportImageService.exportJPG(this.$element[0], "plot.jpg");
var self = this;
self.hideExportButtons = true;
self.ExportImageService.exportJPG(self.$element[0], "plot.jpg", function() {
self.hideExportButtons = false;
});
};
return PlotController;