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

Added onDragEnd event #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Sjohn21
Copy link

@Sjohn21 Sjohn21 commented Jul 28, 2024

Description:
This pull request introduces a new feature to the Menu-Editor library by adding an onDragEnd event. This event is triggered when a user finishes dragging and dropping an item within the menu structure. The onDragEnd event is useful for capturing the final state of the menu after reordering items, allowing for updates or actions based on the new structure.

Key Changes:

  1. New Event Listener: The onDragEnd event listener has been added to the MenuEditor class. It can be registered using the onDragEnd(listener: Itemlistener) method.
  2. Event Triggering: The event is triggered in the makeItSortable method, utilizing Sortable.js's onEnd callback to invoke the provided listener function.
  3. README Update: The README file has been updated to include documentation for the new onDragEnd event, detailing how to use it and providing example usage.

Package Updates:

  • The package-lock.json file has been updated as a result of running npm update. These updates include minor version bumps and dependency adjustments, as detailed in the attached diff file.

Testing:
The new onDragEnd event has been tested locally by monitoring the menu's final state after drag-and-drop actions.

Impact:
This update should be backward-compatible, as it only adds a new feature without altering existing functionality. However, users who install dependencies using the lock file should review the updated packages for potential impacts.

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