diff --git a/src/visualization.jl b/src/visualization.jl index 5ba8699..c87bef6 100644 --- a/src/visualization.jl +++ b/src/visualization.jl @@ -90,11 +90,15 @@ function param_box!(grid, row, labeltxt, observable::Observable) on(box.stored_string) do s try observable[] = parse(Float64, s) - println("changed $labeltxt to $s") + box.displayed_string[] = s catch @warn "Invalid input for $labeltxt: $s" end end + on(observable) do val + box.displayed_string[] = string(val) + end + return box end function build_ui(U, V, Du, Dv, F, k, params_obs, heat_obs) @@ -129,7 +133,6 @@ function build_ui(U, V, Du, Dv, F, k, params_obs, heat_obs) param_box!(textboxgrid, 3, "Feed", F) param_box!(textboxgrid, 4, "kill", k) - println("aufruf") running = Observable(false) on(running) do r @@ -157,22 +160,12 @@ function build_ui(U, V, Du, Dv, F, k, params_obs, heat_obs) end on(btn_Jaguar.clicks) do _ - Du[] = 0.142 Dv[] = 0.078 F[] = 0.0617 k[] = 0.062 - if !running[] - running[] = true - U .= 1.0 - V .= 0.0 - @async while running[] - multi_step!((U, V), stepsize[], heat_obs, params_obs) - sleep(0.0015) - end - end - + reset!(U, V, heat_obs) starting_points!(U, V) heat_obs[] = copy(U) end @@ -187,7 +180,6 @@ function build_ui(U, V, Du, Dv, F, k, params_obs, heat_obs) return end x, y = pt - println("params_obs[].N, ", params_obs[].N) i, j = coord_to_index(x, y, params_obs[].N) # get corners of square that will get filled with concentration