From 82dcf442a645d2dba352e880018c63ecba924b6e Mon Sep 17 00:00:00 2001 From: Martin Muehlhaeuser Date: Fri, 2 Feb 2018 19:46:27 +0000 Subject: [PATCH] leveling: better layout and home button --- .../static/js/klipper_leveling.js | 8 ++- .../templates/klipper_leveling_dialog.jinja2 | 52 +++++++++++++------ 2 files changed, 43 insertions(+), 17 deletions(-) diff --git a/octoprint_klipper/static/js/klipper_leveling.js b/octoprint_klipper/static/js/klipper_leveling.js index 40d661a..d2f0a6f 100644 --- a/octoprint_klipper/static/js/klipper_leveling.js +++ b/octoprint_klipper/static/js/klipper_leveling.js @@ -17,12 +17,16 @@ $(function() { } self.stopLeveling = function() { - self.activePoint(-1); OctoPrint.control.sendGcode("G1 Z" + (self.settings.settings.plugins.klipper.probeHeight()*1 + self.settings.settings.plugins.klipper.probeLift()*1) ); - OctoPrint.control.sendGcode("G28") + self.gotoHome(); + } + + self.gotoHome = function() { + OctoPrint.control.sendGcode("G28"); + self.activePoint(-1); } self.nextPoint = function() { diff --git a/octoprint_klipper/templates/klipper_leveling_dialog.jinja2 b/octoprint_klipper/templates/klipper_leveling_dialog.jinja2 index aa00ab5..db83166 100644 --- a/octoprint_klipper/templates/klipper_leveling_dialog.jinja2 +++ b/octoprint_klipper/templates/klipper_leveling_dialog.jinja2 @@ -4,21 +4,43 @@

Assisted Bed Leveling

\ No newline at end of file