Uploaded image for project: 'IGB'
  1. IGB
  2. IGBF-2114

Enable move tool (hand) to select items

    Details

    • Story Points:
      5
    • Sprint:
      Winter 6 Mar 8 - Mar 19, Spring 1 2021 Mar 22 - Apr 2, Spring 2 2021 Apr 5 - Apr 16

      Description

      When users click the hand button ("move tool"), the cursor changes appearance and users can now click-drag the display to pan left or right.

      When in "move mode", users can't select items in the display.

      Let's change this to allow click-to-select.

      Note that we can't allow click-drag to select because click-drag is already being used for the panning (move) interaction.

      Please note the selection rules within IGB. When nothing is selected, click the "i" in the top right of the window.

        Attachments

          Activity

          Hide
          pbadzuh Philip Badzuh (Inactive) added a comment - - edited

          Grab tool logic change objectives:

          • on mouseUp, if the cursor has moved since mouseDown (drag event), if the underlying area is a glyph, deselect all previous selections and select the glyph; if the underlying area is not a glyph, maintain any selections.
          • on mouseUp, if the cursor has not moved since mouseDown (click event), if the underlying area is a glyph, (if the glyph is selected, deselect it, otherwise, deselect all glyphs and select the glyph underlying the click)

          Holding the alt key changes which of the tools (select vs hand), is active, by changing the classes (SeqMapViewRubberBand vs SmartDragScrollMonitor) that are used, so modifying the methods used by the SmartDragScrollMonitor class should be sufficient to create the desired changes.

          Holding the shift key should allow for selection of multiple glyphs.

          Relevant files:

          Class responsible for UI element configuration

          • $repo/core/igb/src/main/java/com/affymetrix/igb/view/SeqMapView.java

          Class responsible for listening to click events

          • $repo/core/igb/src/main/java/com/affymetrix/igb/view/SeqMapViewMouseListener.java

          Class responsible for forwarding drag event to genoviz SDK

          • $repo/core/igb/src/main/java/com/affymetrix/igb/view/SmartDragScrollMonitor.java
          Show
          pbadzuh Philip Badzuh (Inactive) added a comment - - edited Grab tool logic change objectives: on mouseUp, if the cursor has moved since mouseDown (drag event), if the underlying area is a glyph, deselect all previous selections and select the glyph; if the underlying area is not a glyph, maintain any selections. on mouseUp, if the cursor has not moved since mouseDown (click event), if the underlying area is a glyph, (if the glyph is selected, deselect it, otherwise, deselect all glyphs and select the glyph underlying the click) Holding the alt key changes which of the tools (select vs hand), is active, by changing the classes (SeqMapViewRubberBand vs SmartDragScrollMonitor) that are used, so modifying the methods used by the SmartDragScrollMonitor class should be sufficient to create the desired changes. Holding the shift key should allow for selection of multiple glyphs. Relevant files: Class responsible for UI element configuration $repo/core/igb/src/main/java/com/affymetrix/igb/view/SeqMapView.java Class responsible for listening to click events $repo/core/igb/src/main/java/com/affymetrix/igb/view/SeqMapViewMouseListener.java Class responsible for forwarding drag event to genoviz SDK $repo/core/igb/src/main/java/com/affymetrix/igb/view/SmartDragScrollMonitor.java
          Hide
          ann.loraine Ann Loraine added a comment -

          Quick comment:

          Also handle cases when something else is already selected or when modifier keys are pressed.

          Show
          ann.loraine Ann Loraine added a comment - Quick comment: Also handle cases when something else is already selected or when modifier keys are pressed.
          Hide
          pbadzuh Philip Badzuh (Inactive) added a comment -

          Please review my proposed changes here.

          Show
          pbadzuh Philip Badzuh (Inactive) added a comment - Please review my proposed changes here .
          Hide
          inaylor Irvin Naylor (Inactive) added a comment -

          Philip Badzuh I downloaded your branch to see what the overall ticket is requiring and saw your proposed changes, the logic makes sense to me and in the program itself, double-clicking does indeed zoom me in closer to my selected item.

          I might be wrong though but is that the intended behavior for a "selection" or is it when you outline a glyph with a red box? Just wanted to make sure on my end.

          Show
          inaylor Irvin Naylor (Inactive) added a comment - Philip Badzuh I downloaded your branch to see what the overall ticket is requiring and saw your proposed changes, the logic makes sense to me and in the program itself, double-clicking does indeed zoom me in closer to my selected item. I might be wrong though but is that the intended behavior for a "selection" or is it when you outline a glyph with a red box? Just wanted to make sure on my end.
          Hide
          pbadzuh Philip Badzuh (Inactive) added a comment -

          "Selection" refers to a red outline occurring around a glyph on the canvas. Previously, when using the hand/drag tool, selections were not allowed, but they should now be working. Also, the zoom on double-click is intended - I think it existed prior to my changes, if I'm not mistaken.

          Show
          pbadzuh Philip Badzuh (Inactive) added a comment - "Selection" refers to a red outline occurring around a glyph on the canvas. Previously, when using the hand/drag tool, selections were not allowed, but they should now be working. Also, the zoom on double-click is intended - I think it existed prior to my changes, if I'm not mistaken.
          Hide
          inaylor Irvin Naylor (Inactive) added a comment -

          Okay, I see now. Though when I installed your IGBF-2114.exe download, the selection wouldn't work with the drag tool. I tried reinstalling your download but it doesn't seem to have the changes. I'm thinking it's likely something on my end so I will keep you updated but your code looks like it does the job, I'll let you know if I can get it working on my side.

          Show
          inaylor Irvin Naylor (Inactive) added a comment - Okay, I see now. Though when I installed your IGBF-2114 .exe download, the selection wouldn't work with the drag tool. I tried reinstalling your download but it doesn't seem to have the changes. I'm thinking it's likely something on my end so I will keep you updated but your code looks like it does the job, I'll let you know if I can get it working on my side.
          Hide
          ann.loraine Ann Loraine added a comment -

          Philip Badzuh - Can you demo the new feature during the meeting?

          Show
          ann.loraine Ann Loraine added a comment - Philip Badzuh - Can you demo the new feature during the meeting?
          Hide
          pbadzuh Philip Badzuh (Inactive) added a comment -

          Irvin Naylor, thanks for pointing that out. I have only tested on macOS, so it may be a windows related issue. Maybe someone else running windows can test as well to confirm your observations.

          Show
          pbadzuh Philip Badzuh (Inactive) added a comment - Irvin Naylor , thanks for pointing that out. I have only tested on macOS, so it may be a windows related issue. Maybe someone else running windows can test as well to confirm your observations.
          Hide
          pbadzuh Philip Badzuh (Inactive) added a comment -

          [~aloraine], sure, I can give a quick demo today.

          Show
          pbadzuh Philip Badzuh (Inactive) added a comment - [~aloraine] , sure, I can give a quick demo today.
          Hide
          pbadzuh Philip Badzuh (Inactive) added a comment -

          Please see my PR here.

          Show
          pbadzuh Philip Badzuh (Inactive) added a comment - Please see my PR here .
          Hide
          ann.loraine Ann Loraine added a comment - - edited

          The branch is many commits behind the main branch, so am a bit worried about merging without integration testing first.
          Am making a new branch off the latest tip and cherry-picking the two commits onto that.

          The new branch is IGBF-2114-NewMove at https://bitbucket.org/aloraine/integrated-genome-browser.

          commits with hashes are:

          660f6983f (HEAD -> IGBF-2114, philip/IGBF-2114) IGBF-2114: Keep glyphs selected on drag canvas mouseUp
          a20beb77a IGBF-2114: Allow selection of glyphs during MapScrollMode drag events
          

          Request for Philip Badzuh: Could you test the installers from my fork to check that the changes you have made are functioning properly?

          My fork's downloads section:
          https://bitbucket.org/aloraine/integrated-genome-browser/downloads/

          Show
          ann.loraine Ann Loraine added a comment - - edited The branch is many commits behind the main branch, so am a bit worried about merging without integration testing first. Am making a new branch off the latest tip and cherry-picking the two commits onto that. The new branch is IGBF-2114 -NewMove at https://bitbucket.org/aloraine/integrated-genome-browser . commits with hashes are: 660f6983f (HEAD -> IGBF-2114, philip/IGBF-2114) IGBF-2114: Keep glyphs selected on drag canvas mouseUp a20beb77a IGBF-2114: Allow selection of glyphs during MapScrollMode drag events Request for Philip Badzuh : Could you test the installers from my fork to check that the changes you have made are functioning properly? My fork's downloads section: https://bitbucket.org/aloraine/integrated-genome-browser/downloads/
          Hide
          pbadzuh Philip Badzuh (Inactive) added a comment -

          Sorry about that. I have rebased the topic branch onto master containing all of the missing commits from the upstream remote. I have tested locally and not found any functionality conflicts. Please see the new PR here.

          Show
          pbadzuh Philip Badzuh (Inactive) added a comment - Sorry about that. I have rebased the topic branch onto master containing all of the missing commits from the upstream remote. I have tested locally and not found any functionality conflicts. Please see the new PR here .
          Hide
          ann.loraine Ann Loraine added a comment -

          Merged and installers are build. Ready for testing.

          Show
          ann.loraine Ann Loraine added a comment - Merged and installers are build. Ready for testing.
          Hide
          rweidenh Logan Weidenhammer (Inactive) added a comment -

          Tested on Windows 10.
          Drag tool can be used to select glyphs.
          Holding the alt key changes which tool is active.
          Holding the shift key allows for the selection of multiple glyphs.

          Looks good, moving to Done.

          Show
          rweidenh Logan Weidenhammer (Inactive) added a comment - Tested on Windows 10. Drag tool can be used to select glyphs. Holding the alt key changes which tool is active. Holding the shift key allows for the selection of multiple glyphs. Looks good, moving to Done.

            People

            • Assignee:
              pbadzuh Philip Badzuh (Inactive)
              Reporter:
              ann.loraine Ann Loraine
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: