Forum Discussion
Hi, Angela!
How are you show your dialogs? What functions are you use?
If you have a reference to Dialog object it has the move(left, top) method.
- AngelaIp2 years agoIdeator I
Woohooo! That "move" tricked actually works, many thanks!
Needed some time to understand your idea. The move function seems to be used when users move the dialog manually.
This line moves the dialog on demand from a Method:
parent.frameElement.dialog.move("-100");I am right now still test the correct values for the function. If I use any positive value, the dialog goes to the top right corner, if I use any negative value it goes to the top left. I still need some time to understand this one.
I use a standard maximizable dialog similar to this one: https://gist.github.com/EliJDonahue/583e7a9203e553a64085ed7a4348584c
There are no options available to specify a default position. At least not any more! I discovered that the previous outdated modal dialog even contained options for dialogTop and dialogLeft....
- alaxala2 years agoIdeator I[quote userid="4412" url="~/f/development/55238/how-do-open-a-dialog-on-a-specific-position-or-with-some-kind-of-offset/10342"]There are no options available to specify a default position. At least not any more! I discovered that the previous outdated modal dialog even contained options for dialogTop and dialogLeft....
If you mean modalDialogHelper.show(...), i think it is not this function that is outdated now, but the information that this function is outdated. Maybe it has been rewritten since Chris published his post in 2017. if you look at the function source you will see that it uses the same ArasModules.Dialog.show(...) to create dialog and dialog.move(options.left, options.top) to set initial position under the hood.
- AngelaIp2 years agoIdeator I
I am not much into the history of dialogs, I just know that there were always a lot of dialog related changes during upgrade, especially from 11 to 12 many many years ago.
I assumed the code was outdated, cause I didn´t found references that still use dialogTop and left parameters.
Anyway, specifying left and top know reliable moves the dialog. I right now trigger the movement when the additional search dialog is opened. For the trivial use case that it shall solve it´s a very good solution.
Thanks again for your help and the insights!