Closed hdrake closed 2 years ago
@fonsp, this is awesome! I even was able to understand the javascript well enough to retool some of your functions.
@fonsp, for some reason the @bind
Slider reactivity in ebm.jl
is hit-or-miss. It worked last time I ran the notebook but this time the sliders don't do anything and the variables just stay at their default values. Could you look into it? If it works for you than we can ship the notebook as is and I'll present it on Thursday!
@fonsp, I realized the problem was that I have mistakenly copied the standard Pluto.jl header
using Markdown
using InteractiveUtils
# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error).
macro bind(def, element)
quote
local iv = try Base.loaded_modules[Base.PkgId(Base.UUID("6e696c72-6542-2067-7265-42206c756150"), "AbstractPlutoDingetjes")].Bonds.initial_value catch; b -> missing; end
local el = $(esc(element))
global $(esc(def)) = Core.applicable(Base.get, el) ? Base.get(el) : iv(el)
el
end
end
into a cell within the ebm.jl
notebook itself. This understandably broke the bind macro's reactivity.
Everything is now working as expected!
For SIO Climate Journal club presentation of the MARGO paper.