From 81bd81e581c98f0320cbd32bf8352e8be6d7751f Mon Sep 17 00:00:00 2001 From: Evgeny Blokhin Date: Sat, 1 Jun 2024 19:08:34 +0200 Subject: [PATCH 1/2] Add *on_fixel_checked* --- webassets/iframe_visavis.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/webassets/iframe_visavis.html b/webassets/iframe_visavis.html index 44ceab5..924c6fc 100644 --- a/webassets/iframe_visavis.html +++ b/webassets/iframe_visavis.html @@ -91,6 +91,12 @@ window.addEventListener('hashchange', function(){ url_redraw_react(); }); + + window.plot.on_fixel_checked = (checked) => { + const link = window.plot.json_request(); + visavis_plot.json_request( checked ? `${link}&fixel=1` : link.replace('&fixel=1', '') ); + } + })(); From 1a61b0ebfb6a960b91d514fce78da9de6c87d6d7 Mon Sep 17 00:00:00 2001 From: Evgeny Blokhin Date: Sat, 1 Jun 2024 23:52:00 +0200 Subject: [PATCH 2/2] Fix typo --- webassets/iframe_visavis.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webassets/iframe_visavis.html b/webassets/iframe_visavis.html index 924c6fc..9e8000a 100644 --- a/webassets/iframe_visavis.html +++ b/webassets/iframe_visavis.html @@ -94,7 +94,7 @@ window.plot.on_fixel_checked = (checked) => { const link = window.plot.json_request(); - visavis_plot.json_request( checked ? `${link}&fixel=1` : link.replace('&fixel=1', '') ); + window.plot.json_request( checked ? `${link}&fixel=1` : link.replace('&fixel=1', '') ); } })();