From 3e199d757fbac1d1eeae0ee5763bd194410fc345 Mon Sep 17 00:00:00 2001 From: hyrious Date: Tue, 25 Nov 2025 10:31:44 +0800 Subject: [PATCH] refactor: enable scroll in plotly iframe --- executor/python_executor/matplot/oomol_matplot_helper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/executor/python_executor/matplot/oomol_matplot_helper.py b/executor/python_executor/matplot/oomol_matplot_helper.py index 8b645e71..569f3100 100644 --- a/executor/python_executor/matplot/oomol_matplot_helper.py +++ b/executor/python_executor/matplot/oomol_matplot_helper.py @@ -64,7 +64,7 @@ def render(self, fig_dict): color_scheme = os.getenv("OOMOL_COLOR_SCHEME", "dark") # The generated html has default body margin 8px in chrome, remove it. html = re.sub(r']*?>', r'\g<0>', html, flags=re.I) + 'body { margin: 0 }', html, flags=re.I) context.preview({ "type": "html", "data": html }) else: logger.warning('plotly: no sys.modules["oomol"]') @@ -77,4 +77,4 @@ def render(self, fig_dict): def import_helper(logger: Logger): setup_matplot(logger) - setup_plotly(logger) \ No newline at end of file + setup_plotly(logger)