craftpip / angular-confirm

A multipurpose plugin for alert, confirm & dialog for angular1
http://craftpip.github.io/angular-confirm/
MIT License
115 stars 20 forks source link

Add position option #8

Closed ChaudhryAtif closed 7 years ago

ChaudhryAtif commented 7 years ago

Ability to show the dialog at different places of the screen.

craftpip commented 7 years ago

Some of these options are not possible because of the bootstrap setup, and angular-confirm's self centering thing.

Possible: top-left, top-center, top-right, center-left, center, center-right

Not possible: bottom-left, bottom-center, bottom-right

alignMiddle property determines of the modal is going to be in the center or top columnClass property determines the bootstrap column

example: top-left:

columnClass: 'col-md-4',
alignMiddle: false,

top-right:

columnClass: 'col-md-4 col-md-offset-8',
alignMiddle: false,
craftpip commented 7 years ago

The problem with the bottom position is the content, the content increases and goes out off the window, and has to be scrolled. bottom positioning will cause bad UX

ChaudhryAtif commented 7 years ago

Could there be an option to define or ensure fixed height when positioning it at the bottom? For example, if I have a dialog with 3 input fields (or fixed content), the size will most likely stay constant.

craftpip commented 7 years ago

This can be done, but it will take time. i will add this to my todos. 👍

ChaudhryAtif commented 7 years ago

Sounds good. Thanks!