Open chenghongyao opened 6 months ago
as the title say, check the code
ImGuiIO& io = ImGui::GetIO(); (void)io; io.ConfigWindowsMoveFromTitleBarOnly = true; // don't drag window when clicking on image. ImVec2 viewportPos = ImGui::GetCursorStartPos(); double xpos = static_cast<double>(io.MousePos[0]) - static_cast<double>(viewportPos.x); double ypos = static_cast<double>(io.MousePos[1]) - static_cast<double>(viewportPos.y);
and it cause some issue when using vtkPointPicker, i use this code instead, and everything seems fine
ImGuiIO& io = ImGui::GetIO(); (void)io; io.ConfigWindowsMoveFromTitleBarOnly = true; // don't drag window when clicking on image. ImVec2 viewportPos = ImGui::GetCursorStartPos(); ImVec2 winPos = ImGui::GetWindowPos(); double xpos = static_cast<double>(io.MousePos[0]) - winPos.x - static_cast<double>(viewportPos.x); double ypos = static_cast<double>(io.MousePos[1]) - winPos.y - static_cast<double>(viewportPos.y);
This seems very possible, but we should also look at how to integrate this fix into PR #19 as well. I unfortunately can't work on this easily for a little while but will try to whenever I have time.
as the title say, check the code
and it cause some issue when using vtkPointPicker, i use this code instead, and everything seems fine