Bit dimensions in localStorage
This commit is contained in:
@@ -22,7 +22,7 @@
|
|||||||
let textValue = "";
|
let textValue = "";
|
||||||
|
|
||||||
$: if (textValue) {
|
$: if (textValue) {
|
||||||
value = Number(textValue);
|
value = Number.parseFloat(textValue) || null;
|
||||||
}
|
}
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
|
|||||||
@@ -83,8 +83,8 @@
|
|||||||
export let open;
|
export let open;
|
||||||
export let probeType: "xyz" | "z";
|
export let probeType: "xyz" | "z";
|
||||||
let currentStep: Step = "None";
|
let currentStep: Step = "None";
|
||||||
let cutterDiameter;
|
let cutterDiameter: number;
|
||||||
let cutterLength;
|
let cutterLength: number;
|
||||||
let showCancelButton = true;
|
let showCancelButton = true;
|
||||||
let steps: Array<Step> = [];
|
let steps: Array<Step> = [];
|
||||||
let nextButton = {
|
let nextButton = {
|
||||||
@@ -96,8 +96,10 @@
|
|||||||
$: metric = $Config.settings?.units === "METRIC";
|
$: metric = $Config.settings?.units === "METRIC";
|
||||||
|
|
||||||
$: if (open) {
|
$: if (open) {
|
||||||
cutterDiameter = null;
|
cutterDiameter =
|
||||||
cutterLength = null;
|
Number.parseFloat(localStorage.getItem("cutterDiameter")) || null;
|
||||||
|
cutterLength =
|
||||||
|
Number.parseFloat(localStorage.getItem("cutterLength")) || null;
|
||||||
|
|
||||||
// Svelte appears not to like it when you invoke
|
// Svelte appears not to like it when you invoke
|
||||||
// an async function from a reactive statement, so we
|
// an async function from a reactive statement, so we
|
||||||
@@ -130,6 +132,8 @@
|
|||||||
|
|
||||||
if (probeType === "xyz") {
|
if (probeType === "xyz") {
|
||||||
await stepCompleted("BitDimensions", userAcknowledged);
|
await stepCompleted("BitDimensions", userAcknowledged);
|
||||||
|
localStorage.setItem("cutterDiameter", cutterDiameter);
|
||||||
|
localStorage.setItem("cutterLength", cutterLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
await stepCompleted("PlaceProbeBlock", userAcknowledged);
|
await stepCompleted("PlaceProbeBlock", userAcknowledged);
|
||||||
|
|||||||
Reference in New Issue
Block a user