Rendering error when resizing during render()
See original GitHub issuestart index of line is greater than the end index
This error occurs when the size of the rendering area is changed during browser rendering. And mobile phone rendering also has this error, I think it is similar to #373, is there any good solution?
Issue Analytics
- State:
- Created a year ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Rendering error when resizing during render() #1206
start index of line is greater than the end index This error occurs when the size of the rendering area is changed during...
Read more >Stage would not render correctly when resizing window #204
When using class Stage, the behaviour is reverted so it works correctly. I haven't tested manual rendering and resizing so not sure yet...
Read more >Rendered fewer hooks than expected after each screen resize ...
After each screen resize or switching to mobile view I get error: "Error: Rendered fewer hooks than expected. This may be caused by...
Read more >FlexGird not rendering until resize - Wijmo - GrapeCity
I am using a flex grid with tree format. It will not render the grid until a resize is done. Additionally, it will...
Read more >Swap chain recreation - Vulkan Tutorial
One way that works: add two calls to drawFrame() in the resize callback. GLFW halts the event loop while resizing is in progress,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Do you really have to resize osmd during rendering? you could easily set desired osmd zoom before calling rendering
Also instead of resizing osmd you could resize its parent div:
This way resizing is almost instant and you don’t have to call
osmd.render();
afterwards. Just keep in mind that osmdSizeTrans has to be state variable in order to update ui when it changes. Also afterwards if you need osmd width for example, you get it by multiplying osmd width with osmdSizeTransetc
https://user-images.githubusercontent.com/93236084/187059594-c729a984-78f3-403c-a5ca-b766bb7c3f32.mp4
Yes, ideally OSMD should not be resized during rendering. You could also turn off the autoResize option.
osmd.setOptions({autoResize: false})