diff --git a/WGLMakie/Project.toml b/WGLMakie/Project.toml index 1b4674e159d..d90852e0c15 100644 --- a/WGLMakie/Project.toml +++ b/WGLMakie/Project.toml @@ -26,7 +26,7 @@ FreeTypeAbstraction = "0.10" GeometryBasics = "0.4.1" Hyperscript = "0.0.3, 0.0.4" ImageMagick = "1.1" -JSServe = "2.0.1" +JSServe = "2.1" Makie = "=0.19.1" Observables = "0.5.1" RelocatableFolders = "0.1, 0.2, 0.3, 1.0" diff --git a/WGLMakie/src/three_plot.jl b/WGLMakie/src/three_plot.jl index a2c282dc759..3e6bfed9cc6 100644 --- a/WGLMakie/src/three_plot.jl +++ b/WGLMakie/src/three_plot.jl @@ -14,7 +14,7 @@ function all_plots_scenes(scene::Scene; scene_uuids=String[], plot_uuids=String[ return scene_uuids, plot_uuids end -function JSServe.print_js_code(io::IO, plot::AbstractPlot, context::IdDict) +function JSServe.print_js_code(io::IO, plot::AbstractPlot, context::JSServe.JSSourceContext) uuids = js_uuid.(Makie.flatten_plots(plot)) # This is a bit more complicated then it has to be, since evaljs / on_document_load # isn't guaranteed to run after plot initialization in an App... So, if we don't find any plots, @@ -34,7 +34,7 @@ function JSServe.print_js_code(io::IO, plot::AbstractPlot, context::IdDict) }))""", context) end -function JSServe.print_js_code(io::IO, scene::Scene, context::IdDict) +function JSServe.print_js_code(io::IO, scene::Scene, context::JSServe.JSSourceContext) JSServe.print_js_code(io, js"""$(WGL).then(WGL=> WGL.find_scene($(js_uuid(scene))))""", context) end @@ -58,8 +58,8 @@ function three_display(session::Session, scene::Scene; screen_config...) // well.... not nice, but can't deal with the `Promise` in all the other functions window.WGLMakie = WGL WGL.create_scene($wrapper, canvas, $canvas_width, $scene_serialized, $comm, $width, $height, $(config.framerate), $(ta)) + $(done_init).notify(true) }) - $(done_init).notify(true) } """