Opened 4 weeks ago
Last modified 3 weeks ago
#19109 assigned enhancement
Add 2D label and arrow GUI
| Reported by: | Tom Goddard | Owned by: | Tom Goddard |
|---|---|---|---|
| Priority: | moderate | Milestone: | |
| Component: | Depiction | Version: | |
| Keywords: | Cc: | Elaine Meng, Eric Pettersen | |
| Blocked By: | Blocking: | ||
| Notify when closed: | Platform: | all | |
| Project: | ChimeraX |
Description
Add a GUI to place labels and arrows and adjust their settings like the one in Chimera.
Attachments (2)
Change History (15)
comment:1 by , 4 weeks ago
| Cc: | added |
|---|
comment:2 by , 4 weeks ago
Have experimented a bit more thoroughly, thoughts arise:
(1) I feel there should be controls to Hide/Show in addition to Delete ...reasoning is that if you are working with scenes, deleting a label that appears in one scene is bad since restoring the scene will not regenerate it. So people working with multiple scenes with different labels need to learn to show/hide and NOT delete. This dialog encourages the latter since there is no way to show/hide.
Current 2D Labels GUI is good for making a single image with a single session, and that was my mindset when I said it had all the important things. But for multi-scene sessions, like panels in a figure or for an animation, maybe needs to have separate Hide/Show/Delete for the labels section and arrows section, with a divider between them, or a list (or table) of all the labels and arrows with checkboxes to show/hide, as mentioned below in #2. Actually I like the table better.
(2) I really like that in the Chimera dialog [screenshot below] you would see a list of all the labels at once along with their x,y coords and shown/hidden status (and not mixed in with other stuff like it would be in the model panel) so it was easier to keep track of the potentially dozen different labels in an animation session. In the current dialog you can only see information on the current one, with nothing at all indicating or controlling shown/hidden status.
(3) wording: suggest changing "Use mouse to position labels or make arrows" to something like:
Use mouse for label placement
Use mouse for label/arrow placement
Use mouse for placement
Use mouse to position
Use mouse to create/move labels and arrows
Elaine
comment:3 by , 4 weeks ago
Another minor suggestion is to somehow show the initial value of the label and arrow Color as "None" or "Auto" instead of white, since it's actually behaving as none or auto (which is good). Maybe that's hard to do?
And another observation related to hide/show is that the hidden 2D labels and arrows will be included in the pulldowns and thus subject to modification via the gui even though you can't see anything. However, I agree that is not a very likely situation. It was just because I was using a pre-existing session that had lots of labels, some of which were hidden.
comment:4 by , 4 weeks ago
I agree show/hide capability for labels and arrows is useful when making multiple scenes with different labels for an animation. Maybe the main need is a "Hide all" capability. If I label one scene and save it, then want to start on another scene I probably want to hide all the labels. Then creating new labels works fine. If I go back to edit the original scene it will reshow the labels saved with that scene. A possible trouble is that after scene 2 is made with some labels, going back to scene 1 will not hide the scene 2 labels because they did not exist when scene 1 was created. I think if new models are open that did not exist when a scene was created then the scene code currently just leaves them as is (ie scene 2 labels would remain shown). Maybe new models not present when a scene was made should be hidden. Not sure.
comment:5 by , 4 weeks ago
I'll look at making the Color buttons show "No color", meaning use the default (white on dark backgrounds, black on light backgrounds).
The menu entries that allow modifying "All" labels or arrows will also effect hidden labels. Might good to also have an entry "All shown" that only effects the shown labels.
If you choose from the menu a label that is hidden maybe the sensible thing is that it gets automatically shown. If you chose it you probably want to see it and modify it.
comment:6 by , 4 weeks ago
Models that didn't exist when a scene was saved are hidden when that scene restores.
comment:7 by , 4 weeks ago
Hi Elaine,
There is no "none" setting for a ChimeraX color button. The label gui color appears to be white but in fact the code treats it as "none". But once you change it to any other color there is no way to get it back to "none", even if you change it back to "white" it is then really "white" (even on a white background). The arrow color buton in the label gui was supposed to behave similarly but I had a mistake in the code so it didn't work that way. I've fixed that arrow color behavior.
But maybe I should do this differently. Maybe setting a label or arrow color to "white" when the background is black really means set to "none". Likewise if you set it to black when the background is "white" it actually sets it to "none". That way you could get back to the "none" setting even after you used color on some labels.
Tom
comment:8 by , 3 weeks ago
I don't understand the rationale for this suggestion from comment 2. All of the suggestions seem less clear than the current text. The current text is longer but it fits on one line so making it shorter does not save any space.
(3) wording: suggest changing "Use mouse to position labels or make arrows" to something like:
Use mouse for label placement
Use mouse for label/arrow placement
Use mouse for placement
Use mouse to position
Use mouse to create/move labels and arrows
How about "Use mouse to create or move labels and arrows"?
comment:9 by , 3 weeks ago
The current wording is weird because it mentions both creation and moving but only creation of arrows and moving of labels rather than both of both.
comment:11 by , 3 weeks ago
Ok, I changed the wording to "Use mouse to create or move labels and arrows".
comment:12 by , 3 weeks ago
To help the user find how to hide and show labels and arrows I added the following text to the bottom of the 2D label gui.
"Hide or show labels and arrows using checkbuttons in the Models tool"
comment:13 by , 3 weeks ago
I changed the "default" color behavior. The "default" label color means it automatically switches between white or black depending on whether the grahics background is a dark color or a light color. The ChimeraX color GUI buttons are not able to have a "default" state. So instead if the GUI color button is white and the background is dark or if the button is black and the background is light, then we assume the user means "default" color.
Previously I instead had the initial label or arrow color be "default" if the user has not changed the GUI color button colors. But once they changed those colors there was no way in the GUI to get back to "default" color. The new behavior allows getting back to the default color by setting it to white or black.

I added an initial "2D Labels and Arrows" tool under the Depiction menu. A nice feature is it allows you to place labels and arrows without changing GUI settings. You click in the graphics to place a label or drag to make an arrow. The GUI does not yet have all the bells and whistles of the Chimera GUI. In Chimera labels and arrows were not models so the Chimera Label GUI was the model panel for for labels and arrows. In ChimeraX they are models so I left show/hide out of the ChimeraX label gui so far, although it may be worth adding. Also the ChimeraX gui doesn't currently have an option to put special characters into the label text. That is convenient although any unicode characters can be pasted in so not critical.