-
Notifications
You must be signed in to change notification settings - Fork 42
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
Fixes#149 #158
Fixes#149 #158
Conversation
var transition = this._transition; | ||
this._transition = false; | ||
this._rightDrawer = this.rightDrawer; | ||
this._forceReflow(this.$.drawer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is bad for performance. You can also set this._transition=transition
in a requestAnimationFrame
block. Also, you can check the old value of rightDrawer
from _rightDrawerChanged: function(newRightDrawer, oldRightDrawer)
and if it's undefined
, you can can skip doing all this setup.
Thanks for taking the time to fix this issue though :)
@ThiSoares thanks for the update. A few tests are failing. Probably those assertions need to go inside a rAF callback. |
I agree that it is bad for performance. I changed the proposed solution. Instead of disabling the transition when changing the rightDrawer attribute, I disabled the drawer transition and enable it only when opening/closing the drawer. |
LGTM. Thanks! |
Fixes issue #149.
Reproduce the issue:
Solution: Disabled the drawer transition and enable it only on opening/closing the drawer.
Run the fix: https://jsfiddle.net/thisoares/rdjxmax4/
@blasten @minhlong139