Skip to content

feat: support multiple item drag/resize #133

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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

amanosacrous
Copy link
Contributor

Allow drag/resize of a group of items via the selectedItemsIds input, overriding the default single-item behavior.

  • If the dragged/resized item is included in selectedItemsIds, the entire group will be moved or resized together.
  • If selectedItemsIds is not provided, or the item is not in the selectedItemsIds list, the behavior remains individual as before.

A new example demo (Angular Grid Layout – Multiple Item Handler) has been added to test the new functionality.

Only left-click or touch can drag/resize, to avoid macOS right-click pointerUp inconsistency.
Allow drag/resize of a group of items via `selectedItemsIds` input, overriding default behavior.
@llorenspujol
Copy link
Contributor

Thanks @amanosacrous !!

I see a few things that could be improved:

1- The word "handler" in the title of the example isn’t very clear to me, I’d put something like “Multi-Item Drag & Resize”.

2- It would be good to have a small explanatory text about how to select multiple items, otherwise, it might be hard for people to test it.

3 - (Optional) It would be nice to have some kind of mobile support. Maybe a button or checkboxes to select items. Another option could be allowing item selection when two fingers are on the screen, that would be a cool example.

4 - The placeholders sometimes calculate the position incorrectly. It’s not critical, but it looks a bit off. Since the final position is correct, it should be easy to fix. It’s also easy to reproduce. Example:
image

5 - The selected items can currently swap positions, which shouldn’t be possible. I think we might need to sort the selected items based on the mouse direction and move them accordingly to avoid inconsistencies. I’ll do some further testing to see if that helps. We can also discuss it privately.

Grabacion.2025-07-24.160936.mp4

6- Ideally, selected items should behave, as a single, indivisible block when moved or resized. That behavior isn’t a blocker for me, we can live with it. However, we could look into whether there’s an easy way to fix it.

6.point.mp4

Despite these small issues, everything seems quite solid and usable. After those fixes, I will do further testing to re-validate the task!

Thanks!! 👏

@llorenspujol llorenspujol added the feature New feature label Jul 24, 2025
@llorenspujol llorenspujol force-pushed the feature/multi-items-drag-resize branch from dc73a12 to fa921c7 Compare August 5, 2025 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants