Linked widgets#

Widgets can be linked to compare between different surveys. Try moving one of the views and the others will follow!

[1]:
from ipyaladin import Aladin

from ipywidgets import Layout, Box, widgets

cosmetic_options = {"show_projection_control": False, "show_fullscreen_control": False}

a = Aladin(layout=Layout(width="33.33%"), target="M 81", fov=0.3, **cosmetic_options)
b = Aladin(layout=Layout(width="33.33%"), survey="P/DSS2/red", **cosmetic_options)
c = Aladin(layout=Layout(width="33.33%"), survey="P/2MASS/color", **cosmetic_options)

# synchronize target between 3 widgets
widgets.jslink((a, "_target"), (b, "_target"))
widgets.jslink((b, "_target"), (c, "_target"))

# synchronize FoV (zoom level) between 3 widgets
widgets.jslink((a, "_fov"), (b, "_fov"))
widgets.jslink((b, "_fov"), (c, "_fov"))

items = [a, b, c]

box_layout = Layout(
    display="flex", flex_flow="row", align_items="stretch", border="solid", width="100%"
)
box = Box(children=items, layout=box_layout)
box
[1]:
[ ]: