From 7c5ec8976f39cf119c05e63a1c4e4d4ea5d4f23c Mon Sep 17 00:00:00 2001 From: Kyle Barron Date: Tue, 7 Jan 2025 12:18:27 -0800 Subject: [PATCH] Pass state in `to_html` (#726) ## Available PR templates - [Default](?expand=1&template=default.md) - [Version Release](?expand=1&template=version_release.md) - _Alternatively delete and start empty_ --- lonboard/_map.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lonboard/_map.py b/lonboard/_map.py index 928228cd..4d081e7c 100644 --- a/lonboard/_map.py +++ b/lonboard/_map.py @@ -545,6 +545,9 @@ def inner(fp): title=title or "Lonboard export", template=_HTML_TEMPLATE, drop_defaults=False, + # Necessary to pass the state of _this_ specific map. Otherwise, the + # state of all known widgets will be included, ballooning the file size. + state=self.get_state(), ) if filename is None: