Skip to content

Commit e223073

Browse files
committed
Scrolling/scaling now work.
Had to add mouse wheel listener to scroll pane.
1 parent 6807882 commit e223073

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/main/java/org/tros/torgo/swing/TorgoUserInputPanel.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -212,15 +212,15 @@ public void keyReleased(KeyEvent ke) {
212212
}
213213

214214
};
215-
// inputTextArea.addMouseWheelListener((MouseWheelEvent mwe) -> {
216-
// if (ctrlDown.get()) {
217-
// if (mwe.getPreciseWheelRotation() < 0) {
218-
// increase.run();
219-
// } else {
220-
// decrease.run();
221-
// }
222-
// }
223-
// });
215+
scrollPane.addMouseWheelListener((MouseWheelEvent mwe) -> {
216+
if (ctrlDown.get()) {
217+
if (mwe.getPreciseWheelRotation() < 0) {
218+
increase.run();
219+
} else {
220+
decrease.run();
221+
}
222+
}
223+
});
224224
inputTextArea.addMouseListener(new MouseListener() {
225225
@Override
226226
public void mouseClicked(MouseEvent me) {

0 commit comments

Comments
 (0)