Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ private void handleZoomable(ChartCanvas canvas, Zoomable zoomable,
if (canvas.getChart() == null) {
return;
}
int clicks = (int) e.getDeltaY();
if (clicks == 0) {
// don't zoom on events with no wheel movement (occurs on Linux)
return;
}
// don't zoom unless the mouse pointer is in the plot's data area
ChartRenderingInfo info = canvas.getRenderingInfo();
PlotRenderingInfo pinfo = info.getPlotInfo();
Expand All @@ -122,7 +127,6 @@ private void handleZoomable(ChartCanvas canvas, Zoomable zoomable,
// do not notify while zooming each axis
boolean notifyState = plot.isNotify();
plot.setNotify(false);
int clicks = (int) e.getDeltaY();
double zf = 1.0 + this.zoomFactor;
if (clicks < 0) {
zf = 1.0 / zf;
Expand Down