Skip to content

Commit

Permalink
Update ChartPanManager-- default drag unconstrained
Browse files Browse the repository at this point in the history
The IF-ELSE fork dropped some cases-- like dragging near the title or corners, in which case it would not change the pan mode from the previous mode.  Now, it defaults to unconstrained panning.
  • Loading branch information
gforman44 committed May 10, 2016
1 parent f32c372 commit 1944ef5
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,14 @@ private void startDrag( MouseEvent event ) {
yAxis.setAnimated( false );
yAxis.setAutoRanging( false );

if ( chartInfo.getPlotArea().contains( lastX, lastY ) ) {
panMode = PanMode.Both;
} else if ( chartInfo.getXAxisArea().contains( lastX, lastY ) ) {
if ( chartInfo.getXAxisArea().contains( lastX, lastY ) ) {
panMode = PanMode.Horizontal;
} else if ( chartInfo.getYAxisArea().contains( lastX, lastY ) ) {
panMode = PanMode.Vertical;
} else {
// probably chartInfo.getPlotArea().contains( lastX, lastY ),
// but not necessarily, e.g. in the corners/title/etc.
panMode = PanMode.Both;
}

dragging = true;
Expand Down

0 comments on commit 1944ef5

Please sign in to comment.