This repository was archived by the owner on Jan 18, 2022. It is now read-only.
Commit 5fa1141
Fix performance issue in applyMoveTransition (#6)
getBoundingClientRect causes a DOM reflow when the DOM has been written to
between calls (see http://stackoverflow.com/a/37686736/945863). So call gBCR
on each element first in one loop with no intermediate writes, then use those
results while writing to the DOM in a second loop.1 parent b709a9a commit 5fa1141
1 file changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
76 | 79 | | |
77 | 80 | | |
78 | 81 | | |
| |||
87 | 90 | | |
88 | 91 | | |
89 | 92 | | |
90 | | - | |
91 | | - | |
92 | | - | |
| 93 | + | |
| 94 | + | |
93 | 95 | | |
94 | 96 | | |
95 | 97 | | |
| |||
0 commit comments