Dialog Positioning and Persistence
For some scenarios users want to manually drag and adjust the position of a dialog; perhaps to review obscured content without dismissing the dialog.
Enhanced features for Dialogs include:
- Support open dialog positioned relative-to and offset-from an existing DOM element
- Support dragging to be re-positioned; perhaps with a disableDrag flag
- Support position auto-save and restore;
- Support optional position bounds to constrain drag
- Support position overrides back to default when responsive layout intersects bounds
@ThomasBurleson Is there any way we can make it general enough to work with cards too?
Imagine a dashboard with several cards that you could move around and possibly resize.
+1
+1
+1 for directives to do dragging, snapping, etc on cards as well as dialogs (guess it might as well be any element :smile: )
Resources:
- https://github.com/bevacqua/dragula
+1
+1
+1
+1
+1 Has anyone implemented a solution to the simpler problem of making dialogs draggable? I'm thinking of doing this by making the dialog position absolute and attaching mouse event handlers to the dialog header to update top and left. I have to manually center the dialog on the screen if I do this though. Just wondering if anyone else has already done this.
@DallanQ check out Angular Gridster (Demo) or Dragula (Demo)
Thank you @manbearwiz I'm also looking at ngDraggable and Dragabilly.
+1
FWIW, I ended up writing a directive to make modals draggable: https://gist.github.com/rootscity/fcf909f5820407a67c8e
+1
+1
+1
+1
+1
+1