Flipboard / Flipboard/react-canvas
About layout calculation in 'draw' function
Open
- Dominant language
- JavaScript
- Stars
- 13.2k
- Forks
- 909
- PR merge metrics
- No merged PRs in 30d
Description
I see every time surface draw,it will calculate the layout again:
draw: function () {
var layout;
if (this.node) {
if (this.props.enableCSSLayout) {
layout = layoutNode(this.node);
}
DrawingUtils.drawRenderLayer(this.getContext(), this.node);
}
},
But I think only calculate the whole layout when style changed with the layout is better,for example,change the backgroundColor do not recalculate the laytout.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.