Transform element dragged from another dnd zone
See original GitHub issueI’m trying to find a solution to transforming a dragged element once it enters another dnd zone of the same type
, is that something the current API of svelte-dnd-action
can address? Because I can’t figure it out. transformDraggedElement
seems to only be called from the originating dnd zone and can’t differentiate when the element enters another dnd zone (can it?).
To further explain the use-case for this, I have:
- A grid of photos which is a dnd zone (to rearrange items)
- A list of galleries which is a dnd zone (to rearrange items)
- Individual galleries in the list of galleries are also a dnd zone with the same
type
as the grid of photos, so I can drop photos into the gallery list to move them to that gallery
What I want:
- To transform a photo when it is dragged over a gallery item, to show it can be moved/dropped there.
Video demonstrating what I mean:
https://user-images.githubusercontent.com/6374876/193975018-159e581e-968b-4b15-9af6-00585a0623e2.mov
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:20 (11 by maintainers)
Top Results From Across the Web
transform on parent messes up dragging positioning #128
This div contains a simple DND list. The drag is enabled by traslate instead of changing absolute positioning. Therefore DND drag is incorrect ......
Read more >change element size in drop-zone with react-beautiful-dnd
I want to drag an item from a container A to a container B . In my context the same item has a...
Read more >Draggable - dnd-kit – Documentation
When attaching the listeners to a different element than the node that is draggable, ... After an item starts being dragged, the transform...
Read more >HTML Drag and Drop API - MDN Web Docs
The user may select draggable elements with a mouse, drag those elements to a droppable element, and drop them by releasing the mouse...
Read more >How to Add Drag and Drop in React with React Beautiful DnD
Drag and Drop is a common interaction technique added to allow people to ... to drag and drop items from one draggable area...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
After sleeping on it i think that it might make sense to call transform even when morph is disabled. Can you please explain again why you needed to disable morph but still want to call transform?
Alright. Feel free to make a PR, otherwise I’ll try to make time for it next week
On Sun, Oct 16, 2022, 12:32 Madi @.***> wrote: