Skip to content

Commit

Permalink
Style adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
mfoulksATL committed Nov 4, 2022
1 parent f894f3f commit bb2ad3f
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,16 +186,16 @@ private void maybePopup(MouseEvent e) {
addMouseWheelListener(new MouseWheelListener() {
@Override
public void mouseWheelMoved(MouseWheelEvent e) {
if((e.getModifiersEx() & InputEvent.SHIFT_DOWN_MASK) != 0) {
double pos = (double)(getHorizontalScrollBar().getValue())/(double)(chart.getWidth());
if(e.getWheelRotation() > 0 && getScaleFactor() < 100) {
if ((e.getModifiersEx() & InputEvent.SHIFT_DOWN_MASK) != 0) {
double pos = (double)(getHorizontalScrollBar().getValue()) / (double)(chart.getWidth());
if (e.getWheelRotation() > 0 && getScaleFactor() < 100) {
setScaleFactor((getScaleFactor()*1.2));
}
if(e.getWheelRotation() < 0 && getScaleFactor() > 0.01) {
if (e.getWheelRotation() < 0 && getScaleFactor() > 0.01) {
setScaleFactor((getScaleFactor()/1.2));
}
if(e.getWheelRotation() != 0) {
getHorizontalScrollBar().setValue((int) (pos * (double) (chart.getWidth())));
if (e.getWheelRotation() != 0) {
getHorizontalScrollBar().setValue((int)(pos * (double)(chart.getWidth())));
e.consume();
}
}
Expand Down

0 comments on commit bb2ad3f

Please sign in to comment.