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

Changed all drag events to draggable handles #15

Merged
merged 1 commit into from Aug 12, 2015
Merged

Conversation

blackshadev
Copy link

After I tried to monkey patch jquery draggable into slickgrid it seemed to work pretty well. In case people have problems with jquery.event.drag.js (as I did), this will remove that dependency within the core grid.

6pac added a commit that referenced this pull request Aug 12, 2015
Changed all drag events to draggable handles
@6pac 6pac merged commit 70c0e33 into 6pac:master Aug 12, 2015
@6pac
Copy link
Owner

6pac commented Aug 12, 2015

Thanks! I wish all the pull requests were this concise and to the point.

@6pac
Copy link
Owner

6pac commented Aug 12, 2015

It looks like jquery.event.drop.js has been rolled into jQueryUI droppable as well. Any chance you could patch that one as well if you are familiar with it ? It's not in the grid, the only place it's used is in: example9-row-reordering.html

@blackshadev
Copy link
Author

Give me a couple of minutes

@6pac
Copy link
Owner

6pac commented Aug 12, 2015

:-)
I've been checking all the examples and removing the reference to jquery.event.drag.js. Examples all look all look OK except that one. Looks like even the dragging is busted.

@blackshadev
Copy link
Author

Upon closer inspection this is somewhat less easy than expected. jquery.(drag|drop).event.js are actual events which propagate through the DOM (something which is used by the grid).

Draggable/droppable from jquery UI doesn't. I will look into it a bit more, but the normal D'n'D behaviour will break with my previous pull request.

@blackshadev
Copy link
Author

From what I tell this isn't such a good idea to remove jquery.(drag|drop).event.js just yet, even though it is considered as legacy.
SlickGrid constructs a whole table row as a html string before appending it. This makes it hard to bind a draggable/droppable event to it.

To me it seems better if someone who knows more about the internals of SlickGrid takes a look at this. Stick with jquery.drag.event.js until then.

@6pac
Copy link
Owner

6pac commented Aug 12, 2015

There is possibly a way to put the external libraries into a different namespace so they don't clash with jQueryUI. I might investigate that approach.

@6pac
Copy link
Owner

6pac commented Aug 14, 2015

I've reverted the pull, actually deleted the history. I think I was quick enough that it won't affect anyone. Let's investigate some more.

@GerHobbelt
Copy link

You may be interested to know there's a clone of the drag&drop lib used by SlickGrid in https://github.com/GerHobbelt/jquery.threedubmedia ; I know we have a few very subtle issues with it regarding touch (on modern touchscreen+mouse desktops / laptops) when the DOM gets complex enough, but it might be something to try if only to see if that one will float your boat.

@6pac
Copy link
Owner

6pac commented Oct 9, 2015

I'm interested, but I have to ask: why swap one additional dependency for another? I think we were hoping to find something built into jQuery or jQueryUI to do the job.
What differentiates your lib from the ThreeDub one ? Is it just more up to date ?

@GerHobbelt
Copy link

Just more up to date, 's all. We're using it here in our main app with jQuery v2.

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

Successfully merging this pull request may close these issues.

None yet

3 participants