Skip to content

Commit

Permalink
fix: Better zoom zone double computation
Browse files Browse the repository at this point in the history
  • Loading branch information
bric3 committed Mar 24, 2024
1 parent a416731 commit 1eb797f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1109,8 +1109,8 @@ private void paintMinimap(@NotNull Graphics g, @NotNull Rectangle visibleRect) {

{
// Zoom zone
double zoomZoneScaleX = (double) minimapBounds.width / flamegraphDimension.width;
double zoomZoneScaleY = (double) minimapBounds.height / flamegraphDimension.height;
double zoomZoneScaleX = ((double) minimapBounds.width) / ((double) flamegraphDimension.width);
double zoomZoneScaleY = ((double) minimapBounds.height) / ((double) flamegraphDimension.height);

int x = (int) (visibleRect.x * zoomZoneScaleX);
int y = (int) (visibleRect.y * zoomZoneScaleY);
Expand Down

0 comments on commit 1eb797f

Please sign in to comment.