From 904e7d2ecd2d1cff3d93aa162891141fbec57a86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Fri, 3 May 2019 17:26:55 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20gcode=20viewer:=20do=20not=20inv?= =?UTF-8?q?ert=20axes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The axis inversion is only relevant to the control panel (depends on how the print head is positioned), NOT the rendition of the GCODE. Fixes #3137 --- src/octoprint/static/gcodeviewer/js/renderer.js | 10 ++++++++++ src/octoprint/static/js/app/viewmodels/gcode.js | 8 -------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/octoprint/static/gcodeviewer/js/renderer.js b/src/octoprint/static/gcodeviewer/js/renderer.js index 87455cffb..8dd44d1ce 100644 --- a/src/octoprint/static/gcodeviewer/js/renderer.js +++ b/src/octoprint/static/gcodeviewer/js/renderer.js @@ -356,6 +356,11 @@ GCODE.renderer = (function(){ ctx.fill(); ctx.stroke(); + // draw origin + ctx.beginPath(); + ctx.arc(0, 0, 2, 0, Math.PI * 2, true); + ctx.stroke(); + ctx.strokeStyle = renderOptions["colorGrid"]; ctx.lineWidth = lineWidthFactor; @@ -409,6 +414,11 @@ GCODE.renderer = (function(){ ctx.fill(); ctx.stroke(); + // draw origin + ctx.beginPath(); + ctx.arc(0, 0, 2, 0, Math.PI * 2, true); + ctx.stroke(); + ctx.strokeStyle = renderOptions["colorGrid"]; ctx.lineWidth = lineWidthFactor; diff --git a/src/octoprint/static/js/app/viewmodels/gcode.js b/src/octoprint/static/js/app/viewmodels/gcode.js index a553b08f7..2e2173ce9 100644 --- a/src/octoprint/static/js/app/viewmodels/gcode.js +++ b/src/octoprint/static/js/app/viewmodels/gcode.js @@ -160,14 +160,6 @@ $(function() { }); } - var axesConfiguration = self._retrieveAxesConfiguration(currentProfileData); - if (axesConfiguration) { - GCODE.ui.updateOptions({ - renderer: { - invertAxes: axesConfiguration - } - }); - } }; // subscribe to relevant printer settings...