We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ade211e commit 11642f5Copy full SHA for 11642f5
NetworkDynamicsInspector/src/utils.jl
@@ -27,12 +27,20 @@ function gen_state_options(nw::Network, sidxs)
27
options
28
end
29
30
-function clear_obs!(nt::NamedTuple)
31
- for v in values(nt)
+function clear_obs!(x::Union{NamedTuple, AbstractDict})
+ for v in values(x)
32
clear_obs!(v)
33
34
35
-clear_obs!(obs::Observable) = empty!(obs.listeners)
+function clear_obs!(obs::Observable)
36
+ empty!(obs.listeners)
37
+ clear_obs!(obs.val)
38
+end
39
+function clear_obs!(v::AbstractVector)
40
+ for el in v
41
+ clear_obs!(el)
42
+ end
43
44
clear_obs!(x) = x
45
46
# TODO: move to grpahmakie
0 commit comments