diff --git a/src/octoprint/plugins/svgtogcode/static/js/working_area.js b/src/octoprint/plugins/svgtogcode/static/js/working_area.js index 68221123..c7c2e83a 100644 --- a/src/octoprint/plugins/svgtogcode/static/js/working_area.js +++ b/src/octoprint/plugins/svgtogcode/static/js/working_area.js @@ -250,6 +250,7 @@ $(function(){ var clipPathEl = f.selectAll('clipPath'); if(clipPathEl.length != 0){ console.warn("Warning: removed unsupported clipPath element in SVG"); + self.svg_contains_clipPath_warning(); clipPathEl.remove() } @@ -409,6 +410,18 @@ $(function(){ }; }; + + self.svg_contains_clipPath_warning = function(){ + var error = "

" + gettext("The SVG file contains clipPath elements.
clipPath is not supported yet and has been removed from file.") + "

"; + //error += pnotifyAdditionalInfo("
" + data.jqXHR.responseText + "
"); + new PNotify({ + title: "clipPath elements removed", + text: error, + type: "warn", + hide: false + }); + }; + self.svg_contains_text_warning = function(svg){ var error = "

" + gettext("The SVG file contains text elements.
If you want to laser just their outlines,
please convert them to paths.
Otherwise they will be engraved with infill.") + "

"; //error += pnotifyAdditionalInfo("
" + data.jqXHR.responseText + "
");