Skip to content

Commit

Permalink
Remove JPEG as a download option.
Browse files Browse the repository at this point in the history
  • Loading branch information
mriffle committed Jul 2, 2019
1 parent 2a6d3b1 commit d2bfb03
Show file tree
Hide file tree
Showing 7 changed files with 1,168 additions and 1,192 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@
<!-- Overlay: display on hover of download icon -->
<span class="svg-download-options-block">
Choose download file format:
<a data-tooltip="Download as a JPEG image file."
data-download_type="jpeg"
class="svg-download-option tool_tip_attached_jq venn_diagram_download_link_jq " href="javascript:" style="margin-top:5px;"
>JPEG</a>
<a data-tooltip="Download as PDF file suitable for use in Adobe Illustrator or printing."
data-download_type="pdf"
class="svg-download-option tool_tip_attached_jq venn_diagram_download_link_jq " href="javascript:" style="margin-top:5px;"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,16 @@ export class SVGDownloadUtils {
* Download the given SVG string as an image
*
* @param svgString The <svg>...</svg> XML as a string
* @param type The type, must be one of svg, jpeg, png, pdf
* @param type The type, must be one of svg, png, pdf
*/
static downloadSvgAsImageType( svgNode, type ) {
console.log('called downloadSvgAsImageType');

try {

if( type === 'jpeg' ) {
type = 'jpg';
}

let filename = 'proxl-image.' + type;

if( type === 'jpg' || type === 'png' ) {
if( type === 'png' ) {

let options = {
backgroundColor:'#ffffff',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5931,7 +5931,6 @@ var ImagePagePrimaryRootCodeClass = function() {
throw e;
}
});
$( "#svg-download-jpeg" ).click( function() { downloadSvg( 'jpeg' ); });
$( "#svg-download-png" ).click( function() { downloadSvg( 'png' ); });
$( "#svg-download-pdf" ).click( function() { downloadSvg( 'pdf' ); });
$( "#svg-download-svg" ).click( function() { downloadSvg( 'svg' ); });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ export class DensityPlot {

"<span id=\"svg-download-options\" style=\"font-size:10pt;\">\n" +
"Choose file format:\n" +
"<a data-tooltip=\"Download as a JPEG image file.\" id=\"svg-download-jpeg\" class=\"svg-download-option tool_tip_attached_jq\" href=\"javascript:\" style=\"margin-top:5px;\">JPEG</a>\n" +
"<a data-tooltip=\"Download as PDF file suitable for use in Adobe Illustrator or printing.\" id=\"svg-download-pdf\" class=\"svg-download-option tool_tip_attached_jq\" href=\"javascript:\">PDF</a>\n" +
"<a data-tooltip=\"Download as PNG image file.\" id=\"svg-download-png\" class=\"svg-download-option tool_tip_attached_jq\" href=\"javascript:\">PNG</a>\n" +
"<a data-tooltip=\"Download as scalable vector graphics file suitable for use in Inkscape or other compatible software.\" id=\"svg-download-svg\" class=\"svg-download-option tool_tip_attached_jq\" href=\"javascript:\">SVG</a>\n" +
Expand All @@ -170,7 +169,6 @@ export class DensityPlot {

$parentSpan.append( $html );

$html.find( "#svg-download-jpeg" ).click( function() { SVGDownloadUtils.downloadSvgAsImageType( $("#density-plot-svg")[0], 'jpeg' ); });
$html.find( "#svg-download-png" ).click( function() { SVGDownloadUtils.downloadSvgAsImageType( $("#density-plot-svg")[0], 'png' ); });
$html.find( "#svg-download-pdf" ).click( function() { SVGDownloadUtils.downloadSvgAsImageType( $("#density-plot-svg")[0], 'pdf' ); });
$html.find( "#svg-download-svg" ).click( function() { SVGDownloadUtils.downloadSvgAsImageType( $("#density-plot-svg")[0], 'svg' ); });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@
<!-- Overlay: display on hover of download icon -->
<span class=" svg-download-options-block svg_download_block_jq ">
Choose download file format:
<a data-tooltip="Download as a JPEG image file."
data-download_type="jpeg"
class="svg-download-option tool_tip_attached_jq chart_download_link_jq " href="javascript:" style="margin-top:5px;"
>JPEG</a>
<a data-tooltip="Download as PDF file suitable for use in Adobe Illustrator or printing."
data-download_type="pdf"
class="svg-download-option tool_tip_attached_jq chart_download_link_jq " href="javascript:" style="margin-top:5px;"
Expand Down

0 comments on commit d2bfb03

Please sign in to comment.