Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V0.5.0 #11

Merged
merged 20 commits into from
Sep 3, 2024
Merged

V0.5.0 #11

merged 20 commits into from
Sep 3, 2024

Conversation

niklasramo
Copy link
Owner

@niklasramo niklasramo commented Jul 2, 2024

  • Update deps.
  • Add support for dragging elements that are transformed in any way. This means also that dragging will work as usual even if any ancestor of the dragged element is transformed in any way.
  • Detect and throw an error if a dragged element's position is not "absolute" or "fixed" when a container is defined for the Draggable instance.
  • Allow dragging elements with any CSS position value if there is no container defined for the Draggable instance.
  • Remove onPrepareScrollEffect and onApplyScrollEffect from AutoScroll. After careful investigation it seems that it's not needed to synchronously align the dragged elements after scroll, we can wait for the passive "scroll" event and schedule alignment for the next animation frame. This change actually improved performance during scrolling quite a bit.
  • Remove "beforescroll" and "afterscroll" events from AutoScroll.
  • Rename Draggable getElements option to elements, and update the arguments it receives.
  • Rename Draggable getFrozenStyles option to frozenStyles, and update the arguments it receives.
  • Rename Draggable getPositionChange option to positionModifiers, and make it accept only an array of modifier functions, and update the arguments it receives.
  • Rename Draggable setPosition option to applyPosition, and update the arguments it receives.
  • Remove Draggable getStartPosition option in favor of positionModifiers option, which is now called on drag start and end too.
  • Remove Draggable releaseElements option in favor of doing the same logic in drag end event.
  • Add a proper position modifier system and document it. This is a powerful new feature that allows you to control the positioning of the dragged element more ergonomically during the whole drag process.
  • Add createContainmentModifier helper.

@niklasramo niklasramo merged commit 17affa4 into main Sep 3, 2024
1 check passed
@niklasramo niklasramo deleted the v0.5.0 branch September 3, 2024 20:43
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