haesleinhuepf / stackview

Interactive image stack viewing in jupyter notebooks based on ipycanvas and ipywidgets
BSD 3-Clause "New" or "Revised" License
137 stars 10 forks source link

simplify code #75

Open haesleinhuepf opened 2 months ago

haesleinhuepf commented 2 months ago

This block in _orthogonal.py could be simplified:

        widgets[0].viewer.observe(redraw0)
        widgets[0].viewer.observe(redraw1)
        widgets[0].viewer.observe(redraw2)

        widgets[1].viewer.observe(redraw0)
        widgets[1].viewer.observe(redraw1)
        widgets[1].viewer.observe(redraw2)

        widgets[2].viewer.observe(redraw0)
        widgets[2].viewer.observe(redraw1)
        widgets[2].viewer.observe(redraw2)

git-bob think about this!

github-actions[bot] commented 2 months ago

This message was generated by git-bob (version: 0.2.6, model: gpt-4o-2024-05-13), an experimental AI-based assistant. It can make mistakes and has limitations. Check its messages carefully.

for widget in widgets:
    widget.viewer.observe(redraw0)
    widget.viewer.observe(redraw1)
    widget.viewer.observe(redraw2)