mirror of
https://github.com/nasa/openmct.git
synced 2025-05-29 05:34:18 +00:00
[Formatting] Switched to double quote across the board for consistency
This commit is contained in:
parent
e370271093
commit
3e3d3ebcf9
@ -373,21 +373,21 @@ define(
|
||||
* Export the plot to PDF
|
||||
*/
|
||||
PlotController.prototype.exportPDF = function () {
|
||||
this.ExportImageService.exportPDF(this.$element[0], 'plot.pdf');
|
||||
this.ExportImageService.exportPDF(this.$element[0], "plot.pdf");
|
||||
};
|
||||
|
||||
/**
|
||||
* Export the plot to PNG
|
||||
*/
|
||||
PlotController.prototype.exportPNG = function () {
|
||||
this.ExportImageService.exportPNG(this.$element[0], 'plot.png');
|
||||
this.ExportImageService.exportPNG(this.$element[0], "plot.png");
|
||||
};
|
||||
|
||||
/**
|
||||
* Export the plot to JPG
|
||||
*/
|
||||
PlotController.prototype.exportJPG = function () {
|
||||
this.ExportImageService.exportJPG(this.$element[0], 'plot.jpg');
|
||||
this.ExportImageService.exportJPG(this.$element[0], "plot.jpg");
|
||||
};
|
||||
|
||||
return PlotController;
|
||||
|
@ -25,9 +25,9 @@
|
||||
*/
|
||||
define(
|
||||
[
|
||||
'html2canvas',
|
||||
'jsPDF',
|
||||
'saveAs'
|
||||
"html2canvas",
|
||||
"jsPDF",
|
||||
"saveAs"
|
||||
],
|
||||
function (html2canvas, jsPDF, saveAs) {
|
||||
|
||||
@ -48,7 +48,7 @@ define(
|
||||
* @returns {string} the color, in #RRGGBB form
|
||||
*/
|
||||
function renderElement(element, callback, type) {
|
||||
type = type || 'jpeg';
|
||||
type = type || "jpeg";
|
||||
|
||||
html2canvas(element, {
|
||||
onrendered: function (canvas) {
|
||||
@ -58,13 +58,13 @@ define(
|
||||
break;
|
||||
|
||||
case "png":
|
||||
callback(canvas.toDataURL('image/png', 1.0));
|
||||
callback(canvas.toDataURL("image/png", 1.0));
|
||||
break;
|
||||
|
||||
default:
|
||||
case "jpg":
|
||||
case "jpeg":
|
||||
callback(canvas.toDataURL('image/jpeg', 1.0));
|
||||
callback(canvas.toDataURL("image/jpeg", 1.0));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -73,10 +73,10 @@ define(
|
||||
|
||||
ExportImageService.prototype.exportPDF = function (element, filename) {
|
||||
renderElement(element, function (img) {
|
||||
var pdf = new jsPDF('l', 'px', [element.offsetHeight, element.offsetWidth]);
|
||||
pdf.addImage(img, 'JPEG', 0, 0, element.offsetWidth, element.offsetHeight);
|
||||
var pdf = new jsPDF("l", "px", [element.offsetHeight, element.offsetWidth]);
|
||||
pdf.addImage(img, "JPEG", 0, 0, element.offsetWidth, element.offsetHeight);
|
||||
pdf.save(filename);
|
||||
}, 'jpeg');
|
||||
}, "jpeg");
|
||||
};
|
||||
|
||||
ExportImageService.prototype.exportJPG = function (element, filename) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user