JAL-3073 select columns if dragging sideways in a graph annotation
[jalview.git] / src / jalview / gui / ScalePanel.java
index ea4b42b..6a44d06 100755 (executable)
@@ -267,10 +267,10 @@ public class ScalePanel extends JPanel
   }
 
   /**
-   * DOCUMENT ME!
+   * Action on mouseUp is to set the limit of the current selection group (if
+   * there is one) and broadcast the selection
    * 
    * @param evt
-   *          DOCUMENT ME!
    */
   @Override
   public void mouseReleased(MouseEvent evt)
@@ -278,15 +278,14 @@ public class ScalePanel extends JPanel
     mouseDragging = false;
     ap.getSeqPanel().stopScrolling();
 
+    // todo res calculation should be a method on AlignViewport
     int res = (evt.getX() / av.getCharWidth())
             + av.getRanges().getStartRes();
-
     if (av.hasHiddenColumns())
     {
       res = av.getAlignment().getHiddenColumns()
               .visibleToAbsoluteColumn(res);
     }
-
     res = Math.min(res, av.getAlignment().getWidth() - 1);
 
     if (!stretchingGroup)