diff --git a/src/routes/options-calculator/+page.svelte b/src/routes/options-calculator/+page.svelte index d23b09d4..c5d9031a 100644 --- a/src/routes/options-calculator/+page.svelte +++ b/src/routes/options-calculator/+page.svelte @@ -278,9 +278,9 @@ value: currentStockPrice, color: $mode === "light" ? "black" : "white", dashStyle: "Dash", - width: 1.2, + width: 1.5, label: { - text: `Underlying Price $${currentStockPrice}`, + text: `Underlying Price $${currentStockPrice}`, style: { color: $mode === "light" ? "black" : "white" }, }, zIndex: 5, @@ -289,9 +289,9 @@ value: breakEvenPrice, color: "#10B981", dashStyle: "Dash", - width: $screenWidth < 640 ? 0 : 1.2, + width: $screenWidth < 640 ? 0 : 1.5, label: { - text: `Breakeven $${breakEvenPrice.toFixed(2)}`, + text: `Breakeven $${breakEvenPrice.toFixed(2)}`, style: { color: $mode === "light" ? "black" : "white" }, }, zIndex: 5, @@ -434,7 +434,11 @@ } function handleOptionPriceInput(event) { - selectedOptionPrice = +event.target.value; + if (event.target.value === "") { + selectedOptionPrice = ""; + } else { + selectedOptionPrice = +event.target.value; + } // Clear any existing debounce timeout if (debounceTimeout) clearTimeout(debounceTimeout); @@ -445,7 +449,12 @@ } function handleQuantityInput(event) { - selectedQuantity = +event.target.value; + // Check if the input is empty + if (event.target.value === "") { + selectedQuantity = ""; + } else { + selectedQuantity = +event.target.value; + } // Clear any existing debounce timeout if (debounceTimeout) clearTimeout(debounceTimeout); @@ -746,8 +755,8 @@