From 4885696cb765924745d2b75051c9fdf4be625ded Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Laurent?= <francois.laurent@posteo.net> Date: Tue, 7 Jun 2022 12:21:06 +0200 Subject: [PATCH] fixes #48 --- scripts/make_demonstrator.sh | 9 --------- src/controllers.jl | 2 ++ src/plots.jl | 2 ++ 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/scripts/make_demonstrator.sh b/scripts/make_demonstrator.sh index 1b2bc86..bc821ac 100755 --- a/scripts/make_demonstrator.sh +++ b/scripts/make_demonstrator.sh @@ -54,14 +54,5 @@ if [ -z "$(grep 'echo start the Nyx' ~/.bashrc)" ]; then cat <<EOT >> ~/.bashrc echo start the Nyx tagging UI with command: larvatagger echo or, for a richer interface, type: larvatagger.jl -echo -echo more changes with v0.4: -echo \* no need to add \"/browser-display\" after http://localhost:$port -echo \* step forward/backward with the right/left arrow keys on your keyboard -echo \* simultaneously tag individual time steps with buttons at the bottom -echo -echo a few tips: -echo \* pan the larva view holding the right mouse button -echo \* to properly refresh the page, press Ctrl+F5 instead of F5 alone EOT fi diff --git a/src/controllers.jl b/src/controllers.jl index 777a04e..ee7c308 100644 --- a/src/controllers.jl +++ b/src/controllers.jl @@ -248,6 +248,8 @@ function deactivatelarva!(controller::LarvaController) current = larva.activated[] current == NoLarva && return @info "Larva #$(current) deactivated" + # several different encodings for "no larva": + getactivelarva(controller).val = nothing larva.activated.val = NoLarva # required larva.deactivated[] = current end diff --git a/src/plots.jl b/src/plots.jl index 711acc6..72ecf60 100644 --- a/src/plots.jl +++ b/src/plots.jl @@ -160,6 +160,7 @@ function SingleLarvaView(larvae::Vector{LarvaModel}, controller; editabletags::B tags = gettags(controller) timestep = gettimestep(controller) + player = getplayer(controller) f = on(usertags[]) do _ _, color = gettag(tags[], model[], timestep[], fallback_color) @@ -195,6 +196,7 @@ function SingleLarvaView(larvae::Vector{LarvaModel}, controller; editabletags::B shape_color.val = html_color(color) # visible[] = true # notify all subplots + timestep == last_timestep && pause!(player) elseif visible[] visible[] = false end -- GitLab