Skip to content

Commit

Permalink
fix: remove defaults on computed attribute values
Browse files Browse the repository at this point in the history
  • Loading branch information
annehaley authored and johnkit committed Apr 30, 2024
1 parent bd9c5e2 commit fd024a7
Showing 1 changed file with 13 additions and 31 deletions.
44 changes: 13 additions & 31 deletions pan3d/ui/coordinate_configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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(
Expand All @@ -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",
Expand All @@ -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=(
Expand All @@ -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=(
Expand All @@ -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,
Expand Down

0 comments on commit fd024a7

Please sign in to comment.