Skip to content

"Viewer 1" updates/requests fail once "Viewer 2" is created #708

Open
@bnmajor

Description

When there are multiple viewers within one notebook only calls to the most recently created viewer succeed. For example:

viewer_1 = view(image)
viewer.set_rotate(True)  # succeeds
viewer_2 = view(image)
viewer.set_rotate(False)  # fails
viewer_2.set_rotate(True)  # succeeds

Originally this seemed to be related to the major updates now available in v1.0a41 - For example, the cells

annotations = viewer.get_annotations_enabled
annotations

return

TypeError: Cannot read properties of undefined (reading 'getAnnotationsEnabled')

Testing with previous releases shows that this is actually a long-standing issue. It seems that the reference to the window object returned from api.createWindow no longer has the ImJoyPluginAPI available after another window is created.

@oeway Have you seen behavior like this before?

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions