You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we detect the resize of the document viewport to trigger a
resizing in the plugins,which in turn changes the dom dimensions, and
it' s a loop of calls/get between the DOM and Model which ends up
converging. However, this process is kind of slow because we need to
wait for an animation frame at every iteration.
This revision adds a "snappy" way to handle the resizing by capturing
the top bar and bottom bar dimensions and instantly updating the size
in the model to the final value that we are looking for.
There is only one catch, and a pretty big one, the instant jump of size
takes (of course) place before the drawing of the canvas, which means
that we have one drawing frame where the visible part of the canvas does
not match the part that is drawn. When the latter is smaller than the
visible part, the undrawn part of the canvas is black -> it looks like a
glitch.
That being said, we could take some measures to draw some white
background that spills outside of the visible part to account for those
cases.
0 commit comments