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

Pep Collapsing table when selecting td #192

Open
wailer247 opened this issue Sep 29, 2016 · 3 comments
Open

Pep Collapsing table when selecting td #192

wailer247 opened this issue Sep 29, 2016 · 3 comments

Comments

@wailer247
Copy link

I've been working on a drag and drop system which has been working great so far. However, I have now added a table to the drag and drop system, which for some reason breaks the pep.js plugin. Can anyone help me figure out why? I've set up this codepen showing how to drag the entire table. However, this is not the behavior I want. I need to be able to drag around individual td's. Please change the jquery selector to td in the codepen and you will see that the table collapses.

@pixelplant
Copy link

Hello wailer247

I am not the developer of pep, but from what I see this is normal behavior. Elements get moved with either css transforms or position:absolute, so having td's that break from the initial table seems normal to be.

What are you actually trying to achieve?

@pixelplant
Copy link

pixelplant commented Sep 30, 2016

As a sidenote, if you just want to keep the table "whole" until you stard dragging your tds, make sure you add the option deferPlacement: true to your call, like in this modified example of yours:
http://codepen.io/nekosan/pen/LRjJRj

But once you move all the td's from inside the table the table gets broken.

@wailer247
Copy link
Author

wailer247 commented Sep 30, 2016

I tried using deferPlacement: true, but that doesn't solve what I'm trying to do here. I need the tds to stay where they are, and revert to their original place in the table unless they are dropped on an activeDropRegion. I've modified the codepen here with place:false and a custom easing function. However, in the example I've linked they instead revert to their new position each time, instead of to their original position on the page.

EDIT: I modified the codepen again here, and removed the custom easing function, since it wasn't doing what I wanted. Apparently this has to do with setting the tds to position:relative, but if I change the position to anything else, it breaks any easing I have set on it.

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

No branches or pull requests

2 participants