-
Notifications
You must be signed in to change notification settings - Fork 143
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
Wrong position of elements being dragged within a modal #89
Comments
Same issue here. |
having the same issue |
Have you tried to use |
same issue |
Thanks @GehrmanG I will give it a try |
i hope help you |
If you're using bootstrap / ui-bootstrap (angular) modals and looking for a simple one-liner fix here it is: .modal-dialog { Note: This override is obviously far reaching so just modify as you see fit. The caveat here is that modals no longer slide down but just fade in (which I actually like better). Now that the dragged elements are being positioned properly you can constrain them to a particular area using the following line on the draggable item's dom element as mentioned by others above: sv-element="{containment:'.some-class-that-is-on-the-constraining-parent-dom-element'}" Credit and thanks to the previous posters because I was pulling my hair out (and there's not much left) trying to figure out what the heck was causing the incorrect positioning in the first place! |
^ I didn't originally see this answer, which works great, so I wrote a directive to make the dragged item account for the modal position.
Just add |
I've tried using angular-sortable-view within a bootstrap modal window, but when an element is being dragged, it jumps to the right side of the screen.
I presume that happens because the modal is absolutely positioned, but the directive doesn't consider that while calculating the value for 'left' positioning.
The text was updated successfully, but these errors were encountered: