Skip to content

Commit 5bd3c35

Browse files
cppartsbmatthieu3
authored andcommitted
correcting init_options so initial rotation setting works
1 parent d8fbaff commit 5bd3c35

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/ipyaladin/widget.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,10 @@ def __init__(self, *args: any, **init_options: any) -> None:
221221
# https://github.com/jupyter-widgets/ipywidgets/blob/main/python/ipywidgets/ipywidgets/widgets/domwidget.py
222222
for key in ["layout", "tabbable", "tooltip"]:
223223
init_options.pop(key, None)
224+
if "north_pole_orientation" not in init_options:
225+
init_options["north_pole_orientation"] = init_options.get("rotation", 0)
226+
else:
227+
init_options["rotation"] = init_options["north_pole_orientation"]
224228
# some init options are properties here
225229
self.height = init_options.get("height", self._height)
226230
self.rotation = init_options.get("rotation", self._rotation)

0 commit comments

Comments
 (0)