Commit f9ed729
committed
fix: prevent resize drift caused by stale props between renders
When React can't re-render between consecutive mousemove events,
this.props.width is stale and intermediate deltas are lost, causing
progressive drift where the element resizes slower than the mouse.
Use this.lastSize (already tracked for onResizeStop) as the base for
delta calculation during onResize, falling back to props for the first
event.1 parent edc7cbd commit f9ed729
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
131 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
132 | 136 | | |
133 | 137 | | |
134 | 138 | | |
| |||
0 commit comments