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

fix backdrop out animation #53

Closed
miguelcobain opened this issue Mar 3, 2015 · 6 comments
Closed

fix backdrop out animation #53

miguelcobain opened this issue Mar 3, 2015 · 6 comments

Comments

@miguelcobain
Copy link
Owner

Currently the backdrop disappears instantly instead of fading out animation

@alexlafroscia
Copy link
Contributor

Do you have an example of what you'd like this to look like instead? I would love to help fix this.

@miguelcobain
Copy link
Owner Author

The main problem is here: https://github.com/miguelcobain/ember-paper/blob/master/app/templates/components/paper-nav-container.hbs#L2

When the sidenav is closed, open is set to false and the backdrop is immediately removed from DOM. We need to give some time for the backdrop to fade out before removing it.

Two solutions came to mind:

  • Perhaps using a transitionEnd event or something.
  • Maybe the backdrop could always stay there but we get it "out of the way" with some styling trick
    Not really sure the best way to do this. :/

The angular material website is an example of a correct fade out animation: https://material.angularjs.org/
(don't forget to enter the open/close mode by resizing the viewport)

@alexlafroscia
Copy link
Contributor

Alright cool, I'm coming up on Spring Break next week and will see if I can get a PR together for this 😄

@alexlafroscia
Copy link
Contributor

I'm reading through the code and trying to understand it. What does the backdrop do? And where is the resizing of the browser listened for?

@miguelcobain
Copy link
Owner Author

Backdrop is the dark transparent element that covers the content when the sidenav is open (in open/close mode).
The resizing behaviour is entirely defined using css media queries.

@alexlafroscia
Copy link
Contributor

Oh, I see. Thanks!

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

Successfully merging a pull request may close this issue.

2 participants