From d9fc7c04c8f0621e0b85fba4826ac3b59b9b409d Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 26 Oct 2021 17:14:11 +0200 Subject: [PATCH] slider and checkbox export possible values --- src/PlutoUI.jl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/PlutoUI.jl b/src/PlutoUI.jl index 32ab6beb..d4534929 100644 --- a/src/PlutoUI.jl +++ b/src/PlutoUI.jl @@ -35,4 +35,19 @@ module ExperimentalLayout include("./Layout.jl") end +is_sliderserver_static_export() = + isdefined(Main, :PlutoRunner) && isdefined(getfield(Main, :PlutoRunner), :should_set_possible_bind_values) && Main.PlutoRunner.should_set_possible_bind_values() + +function __init__() + is_sliderserver_static_export() && eval(quote + function Main.PlutoRunner._get_possible_values(slider::Slider) + slider.range + end + + function Main.PlutoRunner._get_possible_values(::CheckBox) + Set{Bool}([true, false]) + end + end) +end + end