zesik / react-splitter-layout

A simple split layout for React and modern browsers. https://zesik.com/react-splitter-layout
MIT License
427 stars 131 forks source link

Dragging slightly to the left can cause jumps to the right #67

Open mstange opened 1 year ago

mstange commented 1 year ago

Steps to reproduce:

  1. Have a splitter that is 6px wide.
  2. Press the mouse button in the middle of the splitter, i.e. 3px away from the left edge.
  3. Move the mouse 1px to the left.

Expected results: The splitter should move 1px to the left.

Actual results: The splitter jumps 2px to the right.

I think the left edge of the splitter is moved to where the mouse is. It would be better to observe the delta and move the splitter relatively, according to that delta.