From 17f29984e5df2e15fefc0f944070846295b2e9e8 Mon Sep 17 00:00:00 2001 From: make-ing Date: Tue, 16 Feb 2016 12:53:20 +0100 Subject: [PATCH] fixed image bug with missing {} --- src/octoprint/plugins/svgtogcode/static/js/matrix_oven.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/octoprint/plugins/svgtogcode/static/js/matrix_oven.js b/src/octoprint/plugins/svgtogcode/static/js/matrix_oven.js index dce7235a..478c638e 100644 --- a/src/octoprint/plugins/svgtogcode/static/js/matrix_oven.js +++ b/src/octoprint/plugins/svgtogcode/static/js/matrix_oven.js @@ -70,12 +70,14 @@ Snap.plugin(function (Snap, Element, Paper, global) { // Validity checks from http://www.w3.org/TR/SVG/shapes.html#RectElement: // If 'x' and 'y' are not specified, then set both to 0. // CorelDraw is creating that sometimes - if (!isFinite(x)) + if (!isFinite(x)) { console.log('No attribute "x" in image tag. Assuming 0.') x = 0; - if (!isFinite(y)) + } + if (!isFinite(y)) { console.log('No attribute "y" in image tag. Assuming 0.') y = 0; + } var transform = elem.transform(); var matrix = transform['totalMatrix']; var transformedX = matrix.x(x, y);