shlomiassaf / ngx-modialog

Modal / Dialog for Angular
http://shlomiassaf.github.io/ngx-modialog
MIT License
686 stars 241 forks source link

Possibility to move the modals #448

Open ramcrys opened 5 years ago

ramcrys commented 5 years ago

Hi everyone, I have a question about a feature of ngx-modialog (not sure if it exists or not, so this is just a question) Is it possible in ngx-modialog to move the modal once it's opened ? In particular, when cursor is near the top of the modal header, an icon appears that shows that it's movable, and we can click on that to move the modal around the page.

Environment:

Thanks in advance.

ManCodeB commented 4 years ago

Well, actually this behaviour should be possible by just adding cdkDrag to your modal window.

See: https://material.angular.io/cdk/drag-drop/overview

cdk is maintained by Angular Material but you do not have to use material design at all. Just import the @angular/cdk/drag-drop module and you are good to go.