implot run with webassembly occur some errors in browser console
I have called ImGui::CreateContext(); ImPlot::CreateContext(); if (ImPlot::BeginPlot("My Plot")){ ... ImPlot::EndPlot();} But when run in browser show occur some errors: For example: fxqtest.html:1 Aborted(Assertion failed: (gp.CurrentPlot != nullptr) && "PlotX() needs to be called between BeginPlot() and EndPlot()!", at: src/implot_items.cpp,397,BeginItem); Uncaught RuntimeError: Aborted(Assertion failed: (gp.CurrentPlot != nullptr) && "PlotX() needs to be called between BeginPlot() and EndPlot()!", at: src/implot_items.cpp,397,BeginItem) at abort (fxqtest.js:1:22554) at ___assert_fail (fxqtest.js:1:39999) at 002eb962:0x14e07 at 002eb962:0x9a04 at callUserCallback (fxqtest.js:1:99385) at Object.runIter (fxqtest.js:1:116151) at Browser_mainLoop_runner (fxqtest.js:1:132745) Uncaught RuntimeError: Aborted(Assertion failed: Ctx != 0L, at: src/imgui.cpp,1547,AddMousePosEvent) at abort (fxqtest.js:1:22554) at ___assert_fail (fxqtest.js:1:39999) at 002eb962:0x42427 at 002eb962:0x2743b at HTMLCanvasElement.onMouseenter (fxqtest.js:1:172855)
I'm running in to this same issue with native C++. Based on what I debugged, it seems the call to ImPlot::BeginPlot() fails to setup the plot because the call to ImGui::ItemAdd(plot.FrameRect, plot.ID, &plot.FrameRect) fails as the ImGui::ImGuiWindowhas a ClipRect of all zeros.
I'm not for sure why this is happening, I'm using version v1.89.8 of ImGui.