Dnd avatar: how to get wysiwyg-preview on dragOver?
-
26-06-2021 - |
سؤال
We've got a request from a customer to support the following scenario:
- on a page we have a container:
div
element which is at the same timedojo.dnd.Source
. inside the container we've got 9
div
elements with similar content: 2 buttons and 2 comboboxesa user should be able to define the sequence of those 9
div
elements by simply dragging them around inside the container.
The task is to present a possible layout preview while dragging.
Will appreciate any ideas.
المحلول
Focusing on your comment and first attempt at this solution, I humbly suggest the following:
If things are being animated and sensitive to mouse pointer changes you should separate the two:
- Leave the element with the drag/drop event subscription (the parent) alone. Do not change its appearance ever.
- Create an element (the child) inside this element that gets animated, but does not affect its parent.
- The parent can be transparent.
Can this be of help?
لا تنتمي إلى StackOverflow