Skip to content

Fix WrapPanel drop index calculation near row boundaries - #22

Open
pyking-wang wants to merge 1 commit into
russkyc:masterfrom
pyking-wang:fix/issue-21-wrappanel-drop-index
Open

Fix WrapPanel drop index calculation near row boundaries#22
pyking-wang wants to merge 1 commit into
russkyc:masterfrom
pyking-wang:fix/issue-21-wrappanel-drop-index

Conversation

@pyking-wang

Copy link
Copy Markdown

Summary

  • calculate WrapPanel targets from the drag proxy in the ItemsPanelRoot coordinate space
  • group WrapPanel slots into flow lines so row-boundary and terminal positions are resolved correctly
  • keep the translucent preview aligned with the final same-collection drop index during AutoScroll
  • limit the change to the Sortable.Avalonia core library

Validation

  • dotnet build Sortable.Avalonia/Sortable.Avalonia.csproj --no-restore -c Release
  • verified same-collection WrapPanel moves 6 -> 4, 12 -> 6 after scrolling, and 3 -> 10
  • verified preview index equals the final collection index and placeholder coordinates match the target slot

Fixes #21

Resolve row-boundary hit testing and keep the preview aligned with the final drop slot while AutoScroll is active.

Refs russkyc#21
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.

Incorrect drop index calculation for WrapPanel near row boundaries

1 participant