Skip to content

Commit

Permalink
fix WGLMakie JS popup (#2976)
Browse files Browse the repository at this point in the history
* fix popup

* clear is an obwservable now
  • Loading branch information
SimonDanisch authored May 26, 2023
1 parent 268a3df commit ffc31a0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion WGLMakie/src/picking.jl
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ function JSServe.jsrender(session::Session, tt::ToolTip)
$(scene).then(scene => {
const plots_to_pick = new Set($(tt.plot_uuids));
const callback = $(tt.callback);
register_popup($popup, scene, plots_to_pick, callback)
WGL.register_popup($popup, scene, plots_to_pick, callback)
})
""")
return DOM.span(JSServe.jsrender(session, POPUP_CSS), popup)
Expand Down
3 changes: 2 additions & 1 deletion WGLMakie/src/wglmakie.bundled.js
Original file line number Diff line number Diff line change
Expand Up @@ -20611,7 +20611,8 @@ window.WGL = {
delete_scenes,
create_scene,
event2scene_pixel,
on_next_insert
on_next_insert,
register_popup
};
export { deserialize_scene as deserialize_scene, threejs_module as threejs_module, start_renderloop as start_renderloop, delete_plots as delete_plots, insert_plot as insert_plot, find_plots as find_plots, delete_scene as delete_scene, find_scene as find_scene, scene_cache as scene_cache, plot_cache as plot_cache, delete_scenes as delete_scenes, create_scene as create_scene, event2scene_pixel as event2scene_pixel, on_next_insert as on_next_insert };
export { render_scene as render_scene };
Expand Down
3 changes: 2 additions & 1 deletion WGLMakie/src/wglmakie.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function render_scene(scene, picking = false) {
if (!scene.visible.value) {
return true;
}
renderer.autoClear = scene.clearscene;
renderer.autoClear = scene.clearscene.value;
const area = scene.pixelarea.value;
if (area) {
const [x, y, w, h] = area.map((t) => t / pixelRatio);
Expand Down Expand Up @@ -478,6 +478,7 @@ window.WGL = {
create_scene,
event2scene_pixel,
on_next_insert,
register_popup,
};

export {
Expand Down

0 comments on commit ffc31a0

Please sign in to comment.