Close sliding panel as soon as it's off the screen for no delay

This commit is contained in:
Devin Lin 2021-02-17 18:19:29 -05:00 committed by Bhushan Shah
parent f231b04bdc
commit 17938b31ae

View file

@ -67,7 +67,11 @@ NanoShell.FullScreenOverlay {
}
function updateState() {
cancelAnimations();
if (window.direction === SlidingPanel.MovementDirection.None) {
if (window.offset <= -headerHeight) {
// close immediately, so that we don't have to wait units.longDuration
window.visible = false;
window.closed();
} else if (window.direction === SlidingPanel.MovementDirection.None) {
if (offset < openThreshold) {
close();
} else {