While implementing creating multiple viewers, I stumbled across a few bugs with the Firefly image viewers.
The extension where we can read the mouse coordinates and translate them to pixel coordinates will read from any viewer. For example, say I have 2 image viewers, V1 and V2. If V1 is in focus (clicked on by the mouse), and then the cursor hovers over V2, the readout from V1 will continue to update while on the V2 image.
Here is a gif demo-ing this bug: https://giphy.com/gifs/26BRwJ59y0v2ymU0M
We should be reading the cursor coordinates from the viewer on the left (ffview) and outputting the result into the box on the right side. However, when I hover the second viewer (asdf), we can see we still get a readout from firefly (which has the plotId ffview, meaning it thinks it’s reading from ffview). Later in the gif, I focus the second viewer, and the box stops updating.
There is a typo in the AREA_SELECT extension (at least this is the only one I checked). In the parameter that the readout callback receives, there is a property called PlotId, when it should be plotId (Notice the capitalization on the ‘p’).
This isn’t a bug, but as far as I can tell, there is no way to release an image viewer. So if a user wants to delete a viewer, then create a new one with the same name, makeImageViewer won’t return a new one.