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

limit item dragging between groups (improve moveResizeValidator via dragGroupDelta) #787

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

Conversation

Dexmaster
Copy link

@Dexmaster Dexmaster commented Nov 2, 2020

Issue Number 514

The closest issue I could find is #514
moveResizeValidator for dragging should be able to return time and groupDelta to block drag to specific group.

Overview of PR

Two more arguments added to moveResizeValidator:

  • dragOrderIndex (original group index of item)
  • dragGroupDelta (group shift difference on dragging)

Now moveResizeValidator can return either:

  • timestamp in ms (integer) as before
  • object with dragTime timestamp in ms (integer) and dragGroupDelta final group index shift (integer) new

Added small demo with even/odd movement validation (item from even row can be moved to only even row and vice versa)

@Dexmaster Dexmaster changed the title improve moveResizeValidator via dragGroupDelta limit item dragging between groups (improve moveResizeValidator via dragGroupDelta) Nov 2, 2020
Copy link

@arenac arenac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change covered by tests?

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.

2 participants