Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial zoom in Zoomer is incorrect #660

Merged
merged 2 commits into from
Feb 27, 2024
Merged
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 @@ -794,11 +794,11 @@
double dataMin;
double dataMax;
if (axis.getSide().isVertical()) {
dataMin = axis.getValueForDisplay(minPlotCoordinate.getY());
dataMax = axis.getValueForDisplay(maxPlotCoordinate.getY());
dataMin = axis.getValueForDisplay(Math.max(0, Math.min(axis.getHeight(), minPlotCoordinate.getY())));
dataMax = axis.getValueForDisplay(Math.max(0, Math.min(axis.getHeight(), maxPlotCoordinate.getY())));

Check warning on line 798 in chartfx-chart/src/main/java/io/fair_acc/chartfx/plugins/Zoomer.java

View check run for this annotation

Codecov / codecov/patch

chartfx-chart/src/main/java/io/fair_acc/chartfx/plugins/Zoomer.java#L797-L798

Added lines #L797 - L798 were not covered by tests
} else {
dataMin = axis.getValueForDisplay(minPlotCoordinate.getX());
dataMax = axis.getValueForDisplay(maxPlotCoordinate.getX());
dataMin = axis.getValueForDisplay(Math.max(0, Math.min(axis.getWidth(), minPlotCoordinate.getX())));
dataMax = axis.getValueForDisplay(Math.max(0, Math.min(axis.getWidth(), maxPlotCoordinate.getX())));

Check warning on line 801 in chartfx-chart/src/main/java/io/fair_acc/chartfx/plugins/Zoomer.java

View check run for this annotation

Codecov / codecov/patch

chartfx-chart/src/main/java/io/fair_acc/chartfx/plugins/Zoomer.java#L800-L801

Added lines #L800 - L801 were not covered by tests
}
switch (getAxisMode()) {
case X:
Expand Down
Loading