diff --git a/editor/svg-editor.js b/editor/svg-editor.js index 7d7d1bf2..09a31a66 100644 --- a/editor/svg-editor.js +++ b/editor/svg-editor.js @@ -400,7 +400,8 @@ path = svgCanvas.pathActions, default_img_url = curConfig.imgPath + "logo.png", workarea = $("#workarea"), - show_save_warning = false; + show_save_warning = false, + exportWindow = null; // This sets up alternative dialog boxes. They mostly work the same way as // their UI counterparts, expect instead of returning the result, a callback @@ -520,7 +521,6 @@ }; var exportHandler = function(window, data) { - var issues = data.issues; if(!$('#export_canvas').length) { @@ -532,7 +532,7 @@ c.height = svgCanvas.contentH; canvg(c, data.svg); var datauri = c.toDataURL('image/png'); - var win = window.open(datauri); + exportWindow.location.href = datauri; var note = 'Select "Save As..." in your browser to save this image as a PNG file.'; @@ -542,7 +542,7 @@ var pre = "\n \u2022 "; note += ("\n\nAlso note these issues:" + pre + issues.join(pre)); } - win.alert(note); + exportWindow.alert(note); }; // called when we've selected a different element @@ -2037,32 +2037,19 @@ }; var clickExport = function() { + // Open placeholder window (prevents popup) + var str = "Loading image, please wait..."; + exportWindow = window.open("data:text/html;charset=utf-8,