In Firefox there appears to be a race condition where sometimes the height of the flamegraph is not updated fast enough, and so the browser renders it with too large of a height. Here you see two graphs stacked above each other; notice the whitespace between them that shouldn't be there:
If I reload the page, the gap (usually) disappears.
The solution I came up with, which I need to test further (it's an intermittent bug...) is to move the viewpoint DOM manipulation until after the new width was created, i.e. svg.removeAttribute("viewBox"); gets moved to the end of update_for_width_change(). I will do some more verification, and if it really fixes the bug, submit a PR.
In Firefox there appears to be a race condition where sometimes the height of the flamegraph is not updated fast enough, and so the browser renders it with too large of a height. Here you see two graphs stacked above each other; notice the whitespace between them that shouldn't be there:
If I reload the page, the gap (usually) disappears.
The solution I came up with, which I need to test further (it's an intermittent bug...) is to move the viewpoint DOM manipulation until after the new width was created, i.e.
svg.removeAttribute("viewBox");
gets moved to the end ofupdate_for_width_change()
. I will do some more verification, and if it really fixes the bug, submit a PR.