Commit b42f2c7
authored
fix: prevent resize drift caused by stale props between renders (#255)
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 b42f2c7
1 file changed
+6
-2
lines changed| 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