From 6c44d8e24334fc170ffc951e582ee63be0787ea0 Mon Sep 17 00:00:00 2001 From: clemniem Date: Thu, 23 Jun 2016 16:51:50 +0200 Subject: [PATCH] added text to infill conversion, text will be treated like an image and always engraved. --- src/octoprint/plugins/svgtogcode/static/js/render_fills.js | 6 +++--- src/octoprint/plugins/svgtogcode/static/js/working_area.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/octoprint/plugins/svgtogcode/static/js/render_fills.js b/src/octoprint/plugins/svgtogcode/static/js/render_fills.js index 3ee1b86e..b21da1b3 100644 --- a/src/octoprint/plugins/svgtogcode/static/js/render_fills.js +++ b/src/octoprint/plugins/svgtogcode/static/js/render_fills.js @@ -74,9 +74,9 @@ Snap.plugin(function (Snap, Element, Paper, global) { elem.type !== "line" && elem.type !== "polygon" && elem.type !== "polyline" && - elem.type !== "path" && - elem.type !== "text" && - elem.type !== "#text" + elem.type !== "path" //&& + // elem.type !== "text" && + // elem.type !== "#text" ){ return false; diff --git a/src/octoprint/plugins/svgtogcode/static/js/working_area.js b/src/octoprint/plugins/svgtogcode/static/js/working_area.js index 5775633a..401fe9b4 100644 --- a/src/octoprint/plugins/svgtogcode/static/js/working_area.js +++ b/src/octoprint/plugins/svgtogcode/static/js/working_area.js @@ -833,7 +833,7 @@ $(function(){ for (var i = 0; i < fillings.length; i++) { var item = fillings[i]; - if (item.type === 'image') { + if (item.type === 'image' || item.type === "text" || item.type === "#text") { // remove filter effects on images for proper rendering var style = item.attr('style'); if (style !== null) {