nion-software / nionswift

Nion Swift is open source scientific image processing software integrating hardware control, data acquisition, visualization, processing, and analysis using Python. Nion Swift is easily extended using Python. It runs on Windows, Linux, and macOS.
http://nion.com/swift
GNU General Public License v3.0
46 stars 33 forks source link

Inconsistent Behaviour on Graphics Tools #1121

Open Tiomat85 opened 3 months ago

Tiomat85 commented 3 months ago

The position and shape options for the varying Graphics tools are inconsistent, with some being able to be resized, some not, some following the 'lock' rules, some not.

    Movable Resizable Respects Position Lock Respects Shape Lock    
Line Tool   Y Y N Y    
Rectangle   Y Y Y* Y   Can still rotate no matter what lock.  Position can be changed by dragging the resize markers in the corners
Line Profile   Y Y N Y    
Spot Tool   Y Y Y* Y   Can still rotate
Ring Tool   N/A Y N/A N    
Ellipse Tool   Y Y Y N   Can still rotate. Position can be changed by dragging the resize markers in the corners
Cross Tool   Y N Y ?    
Interval Tool   Y Y N Y    
Wedge Tool   N/A Y N/A N    
Lattice Tool   ? ? ? ?    

What I would expect is that all tools should have consistent following of the tools and lock options: All 'free' tools are translatable unless the Position lock is engaged. All tools are resizable/adjustable unless the Shape lock is engaged. All 'free' tools are rotatable unless the Rotate lock is engaged (1d Interval excluded)

Additionally it would make sense for the 'grab' points to be for a specific option. Grabbing the corner points (normally used for resizing/reshaping) and it being a move is inconsistent with itself. So I would propose: Grab points at the extremes, used for resizing. Grab point in the middle (or just dragging anywhere inside the bounding rectangle) for translation. Grab outside of the bounding box and moving for rotation.

cmeyer commented 3 months ago

Additional references:

cmeyer commented 3 months ago

Can you make add a task list and make the to-do items more explicit? It's difficult to interpret the combination of the table and broad statements like "grab points at extremes" - what does that mean for a point or lattice?

I'd be open to a 'rotation lock' attribute and associated UI. And I'd like to see the line-type graphics resizable from the center. If there are other particular inconsistencies, let's list those, discuss, and once agreed upon, convert into issues and get PR's for them.

Tiomat85 commented 3 months ago

Sure, I can try break it down into individual tasks. Initially I started with just the table to try document the current behaviour to identify inconsistencies/bugs for individual graphics items. It was only once I had that together and while testing it that there were some behaviours/UX that had inconsistencies that I could not easily put in table form.