Open ali1234 opened 2 months ago
This uses ko observer subscriptions to detect changes, and an extender to provide rounding on the input field. The extender is mostly taken from the ko documentation, which uses numeric rounding as an example. I have modified it slightly by removing the checks on current value and (IMO) better handle invalid input.
Some whitespace also slipped through. Sorry about that.
Open questions:
SERIAL_FLOAT_PRECISION
affect that actual stored values, or just how they get displayed when read back?SERIAL_FLOAT_PRECISION
be read from the printer with gcode?
Checks that the Z value and row and column are numbers and enables the save button as appropriate. Automatically rounds the input field to the displayed precision. The precision may be adjusted, perhaps with a configuration option?
Also tweaks the HTML: Changes the default step from 0.025 to 0.01 (this seems to be the default precision in Marlin) and sets autocomplete="false" on the save button, to prevent Firefox from remembering the state across reloads, potentially leaving the button enabled when it should not be.
Fixes #18