From fd024a7de971c856beb85e2d2828242038ae1a36 Mon Sep 17 00:00:00 2001 From: Anne Haley Date: Wed, 13 Dec 2023 13:34:40 -0500 Subject: [PATCH] fix: remove defaults on computed attribute values --- pan3d/ui/coordinate_configure.py | 44 ++++++++++---------------------- 1 file changed, 13 insertions(+), 31 deletions(-) diff --git a/pan3d/ui/coordinate_configure.py b/pan3d/ui/coordinate_configure.py index e3a37cd4..5f2e0594 100644 --- a/pan3d/ui/coordinate_configure.py +++ b/pan3d/ui/coordinate_configure.py @@ -27,7 +27,7 @@ def __init__( f"[{coordinate_info}.name]", ), ): - with vuetify.VExpansionPanel(value=(f"{coordinate_info}?.name", 0)): + with vuetify.VExpansionPanel(value=(f"{coordinate_info}?.name",)): vuetify.VExpansionPanelTitle("{{ %s?.name }}" % coordinate_info) with vuetify.VExpansionPanelText(): vuetify.VCardSubtitle("Attributes") @@ -49,11 +49,8 @@ def __init__( with vuetify.VSlider( v_model=(axis_info["index_var"],), min=0, - max=( - f"{coordinate_info}?.size - 1", - 0, - ), - step=(f"{coordinate_info}?.step", 1), + max=(f"{coordinate_info}?.size - 1",), + step=(f"{coordinate_info}?.step",), classes="mx-5", ): with vuetify.Template( @@ -62,11 +59,8 @@ def __init__( vuetify.VTextField( v_model=(axis_info["index_var"],), min=0, - max=( - f"{coordinate_info}?.size - 1", - 0, - ), - step=(f"{coordinate_info}?.step", 1), + max=(f"{coordinate_info}?.size - 1",), + step=(f"{coordinate_info}?.step",), hide_details=True, density="compact", style="width: 80px", @@ -80,19 +74,13 @@ def __init__( classes="d-flex pa-0", style="column-gap: 3px" ): vuetify.VTextField( - model_value=(f"{coordinate_info}?.start", 0), + model_value=(f"{coordinate_info}?.start",), label="Start", hide_details=True, density="compact", type="number", - min=( - f"{coordinate_info}?.range[0]", - 0, - ), - max=( - f"{coordinate_info}?.range[1]", - 0, - ), + min=(f"{coordinate_info}?.range[0]",), + max=(f"{coordinate_info}?.range[1]",), step="0.01", __properties=["min", "max", "step"], input=( @@ -103,19 +91,13 @@ def __init__( style="flex-grow: 1", ) vuetify.VTextField( - model_value=(f"{coordinate_info}?.stop", 0), + model_value=(f"{coordinate_info}?.stop",), label="Stop", hide_details=True, density="compact", type="number", - min=( - f"{coordinate_info}?.range[0]", - 0, - ), - max=( - f"{coordinate_info}?.range[1]", - 0, - ), + min=(f"{coordinate_info}?.range[0]",), + max=(f"{coordinate_info}?.range[1]",), step="0.01", __properties=["min", "max", "step"], input=( @@ -126,13 +108,13 @@ def __init__( style="flex-grow: 1", ) vuetify.VTextField( - model_value=(f"{coordinate_info}?.step", 1), + model_value=(f"{coordinate_info}?.step",), label="Step", hide_details=True, density="compact", type="number", min="1", - max=(f"{coordinate_info}?.size", 0), + max=(f"{coordinate_info}?.size",), __properties=["min", "max"], input=( coordinate_change_slice_function,