Skip to content

Adjust zoom-in feature for plots #375

Open

Description

@YehorKo757

Zoom-in is zooming somewhere near selected for zooming area.

Please see example attached.

Screen.Recording.2026-11-13.at.11.44.12.mov

Activity

  1. added
    [scope] bug
    on Nov 13, 2026
  2. rozyczko commented on Nov 16, 2026

    @rozyczko
    Member

    THis is a very small impact issue, which is easy to work around by moving the chart a bit.

    Subtracting anchor margins allows for zoom box to be slightly off wrt. very small segments

    const x = Math.min(recZoom.x, mouseX) - chartView.anchors.leftMargin   // leftMargin = -12 → +12 px
    const y = Math.min(recZoom.y, mouseY) - chartView.anchors.topMargin    // topMargin ≈ 20 → -20 px
    chartView.zoomIn(Qt.rect(x, y, width, height))

    The changes required to fix this are in EasyApp module, so we will leave them for the next release of EasyApp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [priority] low[scope] buguser-experience-enhancement

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions