diff --git a/sorteerhoed/plotter.py b/sorteerhoed/plotter.py index 748a659..b9dc46b 100644 --- a/sorteerhoed/plotter.py +++ b/sorteerhoed/plotter.py @@ -26,11 +26,8 @@ class Plotter: self.logger.info("Queue to park plotter") if self.config['dummy_plotter']: - # fastest way home :-) - self.q.put([0,0,0]) - else: # TODO: find a nice way to park the axidraw in the 0 position - self.q.put([0,0,0]) + self.q.put([(-1/2.54)/self.plotWidth,0,0]) def start(self): try: diff --git a/sorteerhoed/webserver.py b/sorteerhoed/webserver.py index ec31b01..abf0468 100644 --- a/sorteerhoed/webserver.py +++ b/sorteerhoed/webserver.py @@ -270,8 +270,8 @@ class DrawPageHandler(tornado.web.RequestHandler): .replace("{HEIGHT}", str(self.height))\ .replace("{DRAW_WIDTH}", str(self.draw_width))\ .replace("{DRAW_HEIGHT}", str(self.draw_height))\ - .replace("{TOP_PADDING}", str(self.left_padding))\ - .replace("{LEFT_PADDING}", str(self.top_padding)) + .replace("{TOP_PADDING}", str(self.top_padding))\ + .replace("{LEFT_PADDING}", str(self.left_padding)) self.write(contents) class BackendHandler(tornado.web.RequestHandler): diff --git a/www/index.html b/www/index.html index 526e538..bce56bd 100644 --- a/www/index.html +++ b/www/index.html @@ -306,6 +306,10 @@ socket.send(JSON.stringify({ 'action': 'submit' })); + + document.body.removeEventListener('mousemove', draw); + document.body.removeEventListener('mouseup', penup); + document.body.removeEventListener('mousedown', startDrawing); });