diff --git a/src/octoprint/plugins/svgtogcode/static/js/matrix_oven.js b/src/octoprint/plugins/svgtogcode/static/js/matrix_oven.js index 95c50c6d..06b961dd 100644 --- a/src/octoprint/plugins/svgtogcode/static/js/matrix_oven.js +++ b/src/octoprint/plugins/svgtogcode/static/js/matrix_oven.js @@ -44,7 +44,7 @@ Snap.plugin(function (Snap, Element, Paper, global) { var child = children[i]; child.bake(toCubics, dec); } - elem.attr({transform: ''}); + if(child.type !== "#text") elem.attr({transform: ''}); return; } if (elem.type !== "circle" && diff --git a/src/octoprint/plugins/svgtogcode/static/js/working_area.js b/src/octoprint/plugins/svgtogcode/static/js/working_area.js index 3af0b1e4..5775633a 100644 --- a/src/octoprint/plugins/svgtogcode/static/js/working_area.js +++ b/src/octoprint/plugins/svgtogcode/static/js/working_area.js @@ -274,10 +274,10 @@ $(function(){ newSvgAttrs['transform'] = scaleMatrixStr; var newSvg = snap.group(f.selectAll("svg>*")); - var hasText = newSvg.selectAll('text,tspan'); - if(hasText !== null && hasText.length > 0){ - self.svg_contains_text_warning(newSvg); - } + // var hasText = newSvg.selectAll('text,tspan'); + // if(hasText !== null && hasText.length > 0){ + // self.svg_contains_text_warning(newSvg); + // } newSvg.bake(); // remove transforms newSvg.selectAll('path').attr({strokeWidth: '0.5'}); @@ -397,15 +397,15 @@ $(function(){ }; self.svg_contains_text_warning = function(svg){ - var error = "
" + gettext("The svg file contains text elements.
Please convert them to paths.
Otherwise they will be ignored.") + "
" + data.jqXHR.responseText + ""); - new PNotify({ - title: "Text elements found", - text: error, - type: "warn", - hide: false - }); - svg.selectAll('text,tspan').remove(); + // var error = "
" + gettext("The svg file contains text elements.
Please convert them to paths.
Otherwise they will be ignored.") + "
" + data.jqXHR.responseText + ""); + // new PNotify({ + // title: "Text elements found", + // text: error, + // type: "warn", + // hide: false + // }); + // svg.selectAll('text,tspan').remove(); }; self.svg_misfitting_warning = function(svg, misfitting){ diff --git a/src/octoprint/plugins/svgtogcode/templates/svgtogcode.jinja2 b/src/octoprint/plugins/svgtogcode/templates/svgtogcode.jinja2 index 0eba6848..78d0636e 100644 --- a/src/octoprint/plugins/svgtogcode/templates/svgtogcode.jinja2 +++ b/src/octoprint/plugins/svgtogcode/templates/svgtogcode.jinja2 @@ -18,7 +18,7 @@
{{ _('Image engraving parameters:') }}
{{ _('Image Preprocessing') }}