Skip to content

fix: preserve total width when snapping#888

Open
phryneas wants to merge 1 commit into
tomkp:masterfrom
phryneas:pr/fix-snap-totalWidth
Open

fix: preserve total width when snapping#888
phryneas wants to merge 1 commit into
tomkp:masterfrom
phryneas:pr/fix-snap-totalWidth

Conversation

@phryneas
Copy link
Copy Markdown

This is a bug that I encountered when I worked with snapping:

When the dragged divider snapped, the leading pane was moved to the left or right without an opposite adjustment to the trailing pane — so the total width would change and the layout drifted.

This one should fix it.

Disclosure - I've used Claude for this one, but double-triple-checked everything by hand five times. This is not a drive-by slop PR.

When the dragged divider snapped, the leading pane was moved to the
left or right without an opposite adjustment to the trailing pane —
so the total width would change and the layout drifted.

Snap the leading pane and subtract the same delta from the trailing
pane, so the two together preserve the total.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant