-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add redraw method #2878
Add redraw method #2878
Conversation
const redrawReason = this.needsRedraw({clearRedrawFlags: true}); | ||
|
||
if (!redrawReason) { | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe provide the option to skip the check (e.g. a force
argument that defaults to false)? I can imagine scenarios where that would be useful.
|
||
Attempt to draw immediately, rather than waiting for the next draw cycle. By default, deck flushes all changes to the canvas on each animation frame. This behavior might cause the deck canvas to fall out of sync with other components if synchronous updates are required. | ||
|
||
Redrawing frequently outside of rAF may cause performance problems. Only use this method if the render cycle must be managed manually. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rAF
sounds like something that people may not understand on first read maybe type it out or add some link or extra paragraph?
this._drawLayers(redrawReason); | ||
} | ||
// Redraw if necessary | ||
this.redraw(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a nit: My concerns about boolean parameters are already well know so I was planning to keep my peace, but I couldn't help but notice that we already felt the need to add a comment explaining what the false
parameter means, and this is not even in application code, but in the very same file as the function definition....
For google maps integration