Skip to content

Commit df11738

Browse files
author
Randy Heiland
committed
dx=dy=dz
1 parent 52063cc commit df11738

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

bin/config.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,12 @@ def __init__(self):
7272
disabled = disable_domain,
7373
layout=Layout(width=constWidth),
7474
)
75+
76+
7577
self.ydelta = BoundedFloatText(
7678
min=1.,
7779
description='dy',
78-
disabled = disable_domain,
80+
disabled = True,
7981
layout=Layout(width=constWidth),
8082
)
8183
self.zdelta = BoundedFloatText(
@@ -84,6 +86,16 @@ def __init__(self):
8486
disabled = disable_domain,
8587
layout=Layout(width=constWidth),
8688
)
89+
90+
def xdelta_cb(b):
91+
self.ydelta.value = self.xdelta.value
92+
self.zdelta.value = 0.5 * (self.xdelta.value + self.ydelta.value)
93+
self.zmin.value = -0.5 * self.zdelta.value
94+
self.zmax.value = 0.5 * self.zdelta.value
95+
96+
self.xdelta.observe(xdelta_cb)
97+
98+
8799
"""
88100
self.tdelta = BoundedFloatText(
89101
min=0.01,

0 commit comments

Comments
 (0)