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

how to drag item larger than its container but still be 'contained' #46

Closed
alycda opened this issue Apr 22, 2014 · 6 comments
Closed

how to drag item larger than its container but still be 'contained' #46

alycda opened this issue Apr 22, 2014 · 6 comments

Comments

@alycda
Copy link

alycda commented Apr 22, 2014

Thank you for this plugin, I would like the containment option to also work if the element being dragged is larger than its container. Once you get to the edge of the dragged element, you should not be able to drag further away from the edge (thus cropping the inner element OR showing too much space/padding by dragging it away from the edge). Do you think something like this is possible? It's for a responsive site I'm working on, so the values need to be recalculated on window resize (but the draggable container stays the same width).

@desandro
Copy link
Owner

Hi there! Thanks for reporting this issue. I'm having trouble understanding your request. Can you take a look at this example? http://codepen.io/desandro/pen/qpGKx

There's a bug where the dragged element gets shifted to the right edge when you start dragging. Is this the bug you're talking about?

@alycda
Copy link
Author

alycda commented May 16, 2014

Hi,

I'm not really submitting a bug, I'm asking for the example you showed me to allow the user to drag the element left and right but constrained by the gray 'window' so that you never see 'past' the left/right edge of the element. Kind of like a normal scrollbar will stop you from scrolling past the edge of the element you are scrolling.

@desandro
Copy link
Owner

Interesting request! Currently, I'm feeling like this is an edge case. But I'll keep the issue open and see if others are interested in this feature.

@alycda
Copy link
Author

alycda commented May 16, 2014

Thanks for considering it!

@danhumaan
Copy link

I know this is quite an old request, but I wondered if this is something that's been addressed or worked into the library? This is precisely something I need to implement.

@desandro
Copy link
Owner

Sorry, Draggabilly does not support this feature. After 2 years of following this issue, it looks like it hasn't gained enough public interest. Closing for now 🍓

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

3 participants