Closed shaoshing closed 8 years ago
First impression: the improvement is noticeable. Very nice!
This is excellent. I only have some very small suggestions. We should get this merged by the end of the day. Back to @shaoshing!
@iwehrman thanks for reviewing. I've addressed your comments. Back to you.
LGTM!
This PR improves the performance of switching initialized documents by optimizing the rendering process. When switching documents, we toggle the CSS class "section__active" to show panels of active document and hide the rest of the panels. Before, to just toggle one class, we have to re-render all the panels (
Transform, Appearance, Effects, Export, Layers
), which adds extra time to the switching. To improve this, this PR wraps the panel components with adiv
, and toggle the panels by change the class of thediv
. In this way, the panels can remain unchanged.Improvements
(both documents are already initialized)