material icon indicating copy to clipboard operation
material copied to clipboard

Dialog Positioning and Persistence

Open ThomasBurleson opened this issue 11 years ago • 27 comments

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 avatar Jan 16 '15 05:01 ThomasBurleson

@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.

epelc avatar Jan 19 '15 19:01 epelc

+1

levbrie avatar Jan 19 '15 23:01 levbrie

+1

cah-alexsukhodolsky avatar Jun 29 '15 16:06 cah-alexsukhodolsky

+1 for directives to do dragging, snapping, etc on cards as well as dialogs (guess it might as well be any element :smile: )

plato-cambrian avatar Jul 02 '15 23:07 plato-cambrian

Resources:

  • https://github.com/bevacqua/dragula

ThomasBurleson avatar Jul 15 '15 14:07 ThomasBurleson

+1

goranobradovic avatar Aug 28 '15 19:08 goranobradovic

+1

marioharper avatar Sep 23 '15 13:09 marioharper

+1

aberenyi avatar Oct 13 '15 19:10 aberenyi

+1

dneukirchen avatar Oct 27 '15 16:10 dneukirchen

+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 avatar Nov 16 '15 20:11 DallanQ

@DallanQ check out Angular Gridster (Demo) or Dragula (Demo)

manbearwiz avatar Nov 17 '15 05:11 manbearwiz

Thank you @manbearwiz I'm also looking at ngDraggable and Dragabilly.

DallanQ avatar Nov 20 '15 21:11 DallanQ

+1

fleahy avatar Feb 06 '16 16:02 fleahy

FWIW, I ended up writing a directive to make modals draggable: https://gist.github.com/rootscity/fcf909f5820407a67c8e

DallanQ avatar Feb 07 '16 05:02 DallanQ

+1

tztztztztz avatar Mar 01 '17 03:03 tztztztztz

+1

jwmcneelyiii avatar Mar 15 '17 20:03 jwmcneelyiii

+1

ghost avatar Jul 05 '17 12:07 ghost

+1

katak avatar Jul 27 '17 14:07 katak

+1

DanielCaspers avatar Aug 24 '17 18:08 DanielCaspers

+1

raynigon avatar Oct 15 '17 14:10 raynigon