Skip to content

Controls: Zoom region drawing behaves oddly when draw starts outside data area #3897

@MCF

Description

@MCF

There is some inconsistent behaviour when drawing zoom regions starts outside the data area. It is difficult to get specific repeatable behaviour with this, but it does consistently behave differently.

  1. Sometimes the zoom rectangle is drawn as you might expect, coming in from the top of side. the zoom rectangle appears, butted up tight to the axis being crossed as the zoom region is being drawn. Sometimes the zoom region is applied and the zoom occurs upon click release, sometimes it simply disappears upon release and nothing happens.
  2. But sometimes the zoom region immediately becomes very tall or very wide upon entering the data area. If you draw straight down from above the top axis for example, a long narrow rectangle often is drawn. These zoom regions never seem to be applied.

I'm not sure what the expected or desired behaviour is here. Perhaps no zoom rectangle should be started unless the mouse click begins inside the data region?

ScottPlot Version: 5.0.34

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions