Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable dragging dialog to a new position #133

Closed
OlliTietavainenVaadin opened this issue Jul 5, 2019 · 2 comments
Closed

Enable dragging dialog to a new position #133

OlliTietavainenVaadin opened this issue Jul 5, 2019 · 2 comments

Comments

@OlliTietavainenVaadin
Copy link
Member

There should be a toggleable option for making the dialog draggable (repositioning by mouse drag and drop). Related issue: https://github.com/vaadin/vaadin-dialog/issues/120 is possibly needed first.

@jouni
Copy link
Member

jouni commented Oct 22, 2019

Notes for implementation:

Must have:

  • The end user can reposition the dialog with mouse drag

Should have:

  • setBounds(top, right, bottom, left) API (this could be internal at first, low-level API, and we can decide if it makes sense to expose it as public)
  • center()

Details:

  • Resizing (Enable resizing the dialog #132) takes priority over repositioning
  • The dialog should start using absolute positioning (and “snap to pixels”) once the users starts to drag it (instead of flexbox based centering)
  • The whole dialog container (part="overlay") acts as the draggable surface. Any content inside the dialog, which does not specify pointer-events: none will block the drag.
  • The user should not be able to drag the dialog completely outside the browser viewport. A certain minimum area of the dialog should always stay visible.

API:

  • <vaadin-dialog draggable>
  • vaadinDialog.draggable = true

@web-padawan
Copy link
Member

Fixed by #139

@tomivirkki tomivirkki moved this from Work in Progress to Candidates for Vaadin 14.2 in No longer in use, go to https://vaadin.com/roadmap Mar 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants