Skip to content

Commit

Permalink
Merge pull request #7 from gforman44/master
Browse files Browse the repository at this point in the history
Update ChartPanManager-- default drag unconstrained
  • Loading branch information
gillius committed May 10, 2016
2 parents f32c372 + 1944ef5 commit dbe05fa
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 dbe05fa

Please sign in to comment.