mouseDragLastX = -1;
mouseDragLastY = -1;
mouseDragging = false;
+ if (dragMode == DragMode.Resize)
+ {
+ ap.adjustAnnotationHeight();
+ }
dragMode = DragMode.Undefined;
ap.getScalePanel().mouseReleased(evt);
}
/**
- * DOCUMENT ME!
+ * Action on starting or continuing a mouse drag. There are two possible
+ * actions:
+ * <ul>
+ * <li>drag up or down on a graphed annotation increases or decreases the
+ * height of the graph</li>
+ * <li>dragging left or right selects the columns dragged across</li>
+ * </ul>
+ * A drag on a graph annotation is treated as column selection if it starts
+ * with more horizontal than vertical movement, and as resize if it starts
+ * with more vertical than horizontal movement. Once started, the drag does
+ * not change mode.
*
* @param evt
- * DOCUMENT ME!
*/
@Override
public void mouseDragged(MouseEvent evt)
{
/*
- * todo: if dragMode is Undefined:
+ * if dragMode is Undefined:
* - set to Select if dx > dy
* - set to Resize if dy > dx
* - do nothing if dx == dy