Skip to content

Using Axis Limit Constraints causes zooming when panning #633

@eversolea

Description

@eversolea

In this simplified code snippet below, I use the SetupAxisLimitsConstraint method to keep my barchart within a desired range (along with zoom constraints)

ImPlot::BeginPlot(chart_name.c_str(), ImVec2(-1, 0), ImPlotFlags_NoBoxSelect | ImPlotFlags_NoMenus | ImPlotFlags_NoMouseText)) {
ImPlot::SetupAxis(ImAxis_X1, x_axes_name.c_str());
ImPlot::SetupAxis(ImAxis_Y1, y_axes_name.c_str(), ImPlotAxisFlags_AutoFit);
ImPlot::SetupAxisLimitsConstraints(ImAxis_X1, 0, 190.35);
ImPlot::SetupAxisZoomConstraints(ImAxis_X1, 0, 190.35);

}

But when zooming in a tad (see below)

Image

and then panning left outside of the window, then right outside of the window, and doing so repeatedly (never using the zoom input), the range seems to be closing in / zooming in:

Image (notice it is now ~60-120)

I think this might be a bug so wanted to bring it up as an issue here.

Metadata

Metadata

Assignees

Labels

prio:mediumMedium prioritystatus:todoTask identified but not startedtype:fixSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions