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

Drag and Drop within same div #123

Open
aadeshkranderia opened this issue Apr 2, 2018 · 3 comments
Open

Drag and Drop within same div #123

aadeshkranderia opened this issue Apr 2, 2018 · 3 comments
Labels

Comments

@aadeshkranderia
Copy link

I have a image tag and a paragraph tag inside a div container. Is it possible to drag and drop the image or paragraph inside the same div container. I mean I just want to move the element inside the div. Please let me know if that's possible?

@ObaidUrRehman
Copy link
Owner

Not sure I understand how the DOM in your case is structured. You could decorate the parent div with both dragable and dropable but that would not do any good since drag drop ordering is not currently supported.

@redevill
Copy link

redevill commented Jun 4, 2018

This is an extension of the same question:
I wanted to implement my own ordering, by dragging and dropping in the same div.
The intent was to have both draggable and droppable on the element in the same div as below.
I'll pass the original Position data as the drag data, and then process it on the element where it gets dropped.

`<div class="sortingContainer" *ngFor="let result of results">
<mySortableResult class="row"
droppable
(onDrop)="onItemDropDoSorting($event)"
draggable
[dragHandle]="'.drag-handle'"
[dragData]="SourcePositionData">

`

However, I get the following error:
2 ERROR TypeError: _co.onItemDropDoSorting is not a function

My guess is that the (onDrop) event is mapped back to the parent (sortingContainer div) component.ts file for which the above template is associated... and NOT the custom "mySortableResult.ts" file.

Thoughts?
TIA
Eti

@dhiraj3301
Copy link

Is there any plan to support drag and drop to the same div (Container) by doing drag and drop?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants