react-split-pane icon indicating copy to clipboard operation
react-split-pane copied to clipboard

Fix cursor being out of sync with resize bar after hitting min/max

Open Jephuff opened this issue 5 years ago • 1 comments
trafficstars

This was being caused when quickly moving the cursor past the min/max, the new position wasn't being set when hitting the min/max condition.

Example: If minSize = 50, size = 60, sizeDelta = 20 In this can newSize would be 40 so it would hit the minSize condition to change newSize to 50 and then it would skip setting position.

With this change, it will do the same min/max logic but it will also set the position with the 10px movement.

fixes #235

Jephuff avatar Apr 20 '20 02:04 Jephuff

Coverage Status

Coverage increased (+0.07%) to 91.903% when pulling 5f7f21f63e5950a5590d6232184c4bf1fed32731 on Jephuff:always-set-position into 456f5c1f3e05d0f85e1416b7d3790a44e849bbc4 on tomkp:master.

coveralls avatar Apr 20 '20 02:04 coveralls