Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

fix: honor back/next state on page drops correctly #636

Merged
merged 1 commit into from
Oct 11, 2018

Conversation

marionebl
Copy link
Contributor

This fixes a number of bugs around page drag/drop.

Main change

  1. Decided based on DropState.next vs DropState.back if the Page should be inserted after (movePageAfter) or before (movePageBefore).
    Implementing the case handling exposed another bug where dropping/dragging a page on itself was not handled. I changed it to not show the drop indicators in this case.

Yak shaving

  1. Remove project.reArrangePagesIndex, use project.movePageTo instead
  2. Abstract project.movePageAfter to project.movePageTo to power project.movePageAfter and project.movePageBefore
  3. Provide and use getIndex on Page to avoid intermediary states in PageListContainer. Only state in PageListContainer now is draggedPage.

@Palmaswell Palmaswell merged commit aa67120 into master Oct 11, 2018
@tilmx tilmx deleted the fix/handle-page-drop branch November 7, 2018 20:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants