This commit is contained in:
Ruben van de Ven 2019-10-31 16:47:11 +01:00
parent bb3e20c5a6
commit b3a73d6ea9
3 changed files with 7 additions and 6 deletions

View File

@ -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:

View File

@ -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):

View File

@ -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);
});
</script>
</body>