1
0
Fork 0
mirror of https://github.com/gwm17/implot.git synced 2024-11-23 02:38:53 -05:00

fix bug in IsPlotYAxisHovered

This commit is contained in:
Evan Pezent 2020-07-26 21:39:17 -05:00
parent 5ee62dd86a
commit 397fc05ca8
2 changed files with 2 additions and 2 deletions

View File

@ -1918,7 +1918,7 @@ bool IsPlotYAxisHovered(int y_axis_in) {
const int y_axis = y_axis_in >= 0 ? y_axis_in : gp.CurrentPlot->CurrentYAxis;
ImRect bb_plot_pad = gp.BB_Plot;
bb_plot_pad.Min.x += 5; bb_plot_pad.Max.x -= 5;
return gp.CurrentPlot->YAxis[y_axis].Hovered && !!bb_plot_pad.Contains(ImGui::GetMousePos());
return gp.CurrentPlot->YAxis[y_axis].Hovered && !bb_plot_pad.Contains(ImGui::GetMousePos());
}
ImPlotPoint GetPlotMousePos(int y_axis_in) {

View File

@ -719,7 +719,7 @@ void ShowDemoWindow(bool* p_open) {
}
init = false;
}
ImGui::BulletText("Drag data items from the left column onto the plot or onto y axis");
ImGui::BulletText("Drag data items from the left column onto the plot or onto a specific y-axis.");
ImGui::BeginGroup();
if (ImGui::Button("Clear", ImVec2(100, 0))) {
for (int i = 0; i < K_CHANNELS; ++i) {