mirror of
https://github.com/nasa/openmct.git
synced 2025-06-13 20:58:15 +00:00
[Formatting] Fix styling errors
This commit is contained in:
@ -375,7 +375,7 @@ define(
|
|||||||
PlotController.prototype.exportPDF = function () {
|
PlotController.prototype.exportPDF = function () {
|
||||||
var self = this;
|
var self = this;
|
||||||
self.hideExportButtons = true;
|
self.hideExportButtons = true;
|
||||||
self.ExportImageService.exportPDF(self.$element[0], "plot.pdf", function() {
|
self.ExportImageService.exportPDF(self.$element[0], "plot.pdf", function () {
|
||||||
self.hideExportButtons = false;
|
self.hideExportButtons = false;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -386,7 +386,7 @@ define(
|
|||||||
PlotController.prototype.exportPNG = function () {
|
PlotController.prototype.exportPNG = function () {
|
||||||
var self = this;
|
var self = this;
|
||||||
self.hideExportButtons = true;
|
self.hideExportButtons = true;
|
||||||
self.ExportImageService.exportPNG(self.$element[0], "plot.png", function() {
|
self.ExportImageService.exportPNG(self.$element[0], "plot.png", function () {
|
||||||
self.hideExportButtons = false;
|
self.hideExportButtons = false;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -397,7 +397,7 @@ define(
|
|||||||
PlotController.prototype.exportJPG = function () {
|
PlotController.prototype.exportJPG = function () {
|
||||||
var self = this;
|
var self = this;
|
||||||
self.hideExportButtons = true;
|
self.hideExportButtons = true;
|
||||||
self.ExportImageService.exportJPG(self.$element[0], "plot.jpg", function() {
|
self.ExportImageService.exportJPG(self.$element[0], "plot.jpg", function () {
|
||||||
self.hideExportButtons = false;
|
self.hideExportButtons = false;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -29,14 +29,14 @@ define(
|
|||||||
"jsPDF",
|
"jsPDF",
|
||||||
"saveAs"
|
"saveAs"
|
||||||
],
|
],
|
||||||
function (html2canvas, jsPDF, saveAs) {
|
function (html2canvas, JsPdf, saveAs) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The export image service will export any HTML node to
|
* The export image service will export any HTML node to
|
||||||
* PDF, JPG, or PNG.
|
* PDF, JPG, or PNG.
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function ExportImageService () {
|
function ExportImageService() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -75,7 +75,7 @@ define(
|
|||||||
callback = typeof callback === "function" ? callback : function () {};
|
callback = typeof callback === "function" ? callback : function () {};
|
||||||
|
|
||||||
renderElement(element, function (img) {
|
renderElement(element, function (img) {
|
||||||
var pdf = new jsPDF("l", "px", [element.offsetHeight, element.offsetWidth]);
|
var pdf = new JsPdf("l", "px", [element.offsetHeight, element.offsetWidth]);
|
||||||
pdf.addImage(img, "JPEG", 0, 0, element.offsetWidth, element.offsetHeight);
|
pdf.addImage(img, "JPEG", 0, 0, element.offsetWidth, element.offsetHeight);
|
||||||
pdf.save(filename);
|
pdf.save(filename);
|
||||||
callback();
|
callback();
|
||||||
|
Reference in New Issue
Block a user