ngx-dnd icon indicating copy to clipboard operation
ngx-dnd copied to clipboard

dragging event in ngx-dnd-container

Open speculees opened this issue 7 years ago • 9 comments

[ ] bug report => search github for a similar issue or PR before submitting [x ] feature request [ ] support request => Please do not submit support request here

Browser: [all] Language: [all]

I'm trying to implement a feature that would activate scroll of the container that holds the "ngx-dnd". For this I need event like "dragging" in the "ngx-dnd-container". This should trigger on mousemove event while dragging.

speculees avatar Jul 11 '17 19:07 speculees

Okay, I took the liberty of forking this project. Check out the demo at this link. There find the ngx-section "Nested Sortable - recursive - scrollable drag". Also, the ngx-section "Nested Sortable - containers" should emit the dragging event in console. Sorry for breaking the responsiveness and what not in the demo .. I'll update when I get a chance.

speculees avatar Jul 17 '17 10:07 speculees

I'm trying to implement this functionality. I checked out Nested Sortable - containers example and in console it logged out this: image And checked out the Code example but it does not show the events of dragging and dragned.

I tried to use (dragging) and (dragned) but it does not seems to work.

How can I check if something is dragging?

rtalexk avatar Dec 02 '17 23:12 rtalexk

Simple logging like this can help you to figure it out:

public builderDrag(event) {
        console.log(event);
    }

The element with events is a container with my draggable items.

<div (drop)="builderDrop($event)" (drag)="builderDrag($event)" ngxDroppable</div>

Works for me

vitalybibikov avatar Dec 07 '17 06:12 vitalybibikov

Hi @EvilAvenger. I can't find the way to make scrolling working when dragging. Can you help me how to solve it?

newdevsoft7 avatar Jan 12 '18 20:01 newdevsoft7

any update on the scrolling issue?

sarahm7 avatar Apr 05 '18 08:04 sarahm7

Is someone able to do a PR adding the dragging event?

Hypercubed avatar Apr 05 '18 15:04 Hypercubed

Is this achieved? I am looking to implement drag while scroll

sundaravadivel1980 avatar May 13 '18 15:05 sundaravadivel1980

I couldn't find in the docs anything about the emitters. What do you think of updating it with a list of emitters and a small description of them? Also, what about merging the 'dragend', 'dragging' and the other emitters that @speculees implemented? Are you guys considering it?

pedrovsp avatar Jul 05 '18 15:07 pedrovsp

@speculees I used your great fork till start update to angular 7, and now your fork is deprecated for updating to angular 7 because the peer dependencies have ranged between 4 and 5 angular versions. Can you update your npm package to 7? Or suggest a pull request to official "swimlane/ngx-dnd" lib which already updated to 7? (dragging) and (dragend) events helps realize scroll and save-state event when the element was finally dropped, its very handy to use.

IgorKurkov avatar Mar 18 '19 11:03 IgorKurkov