-
Notifications
You must be signed in to change notification settings - Fork 2
Change position of dialog via Java API #138
Comments
Hi, how is it going? It seems that Vaadin company is not very active now! |
Hi @ywuliu. I can assure you that we have been very busy with the Vaadin 14 release and have not really stopped to rest after shipping that last week. Since this is an open source project (both the
IMO this feature does have merit and should be added once we have time for other more important features. Though, this has been added to the wrong repository as I think the API should be for the |
If there were more than one component that could benefit from the API, then it might make sense as a mixin interface for the framework, but at the moment I can't think of any other cases for this. Thus it should be just in the component for now. |
I would also appreciate to have a |
Closing in favor of #154. Now when we are working on draggable dialog support for the upcoming 14.2 this actually makes more sense. Let's use that issue, I linked this one from there. |
Our dialog's position cannot be changed via Java API out of the box. This should be provided, since not all dialogues needed to be centered.
Following methods as a proposal:
setPositionXYZ(int value, Unit unit)
, where XYZ could be Top, Left, Bottom, Right. Sets the position of the dialog respective to the set values, as if the user uses css to position the dialog (like "top: 20px; left: 10px")setPositionOutsideOfViewportAllowed(boolean)
. If set to false, the dialog position will be modified to prevent, that the dialog is set outside of the viewport. This method is an optional convenience method, since it can be calculated by the developer if needed.The text was updated successfully, but these errors were encountered: