Skip to content

Commit

Permalink
Modified the use CTRL and Meta
Browse files Browse the repository at this point in the history
  • Loading branch information
mfoulks3200 committed Dec 26, 2022
1 parent cc0c926 commit eca4192
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ private void maybePopup(MouseEvent e) {
addMouseWheelListener(new MouseWheelListener() {
@Override
public void mouseWheelMoved(MouseWheelEvent e) {
if ((e.getModifiersEx() & InputEvent.META_DOWN_MASK) != 0||(e.getModifiersEx() & InputEvent.CTRL_DOWN_MASK) != 0) {
if (((e.getModifiersEx() & InputEvent.META_DOWN_MASK) != 0 && System.getProperty("os.name").contains("Mac OS X"))||(e.getModifiersEx() & InputEvent.CTRL_DOWN_MASK) != 0 && !System.getProperty("os.name").contains("Mac OS X")) {

This comment has been minimized.

Copy link
@vlsi

vlsi Dec 26, 2022

Would you please move.getProperty.contains to a static field?

double pos = (double)(getHorizontalScrollBar().getValue()) / (double)(chart.getWidth());
if (e.getWheelRotation() > 0 && getScaleFactor() < 100) {
setScaleFactor((getScaleFactor()*1.2));
Expand Down

0 comments on commit eca4192

Please sign in to comment.