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