(search) Swap swipe direction for more consistent experience
This commit is contained in:
parent
c47730f2cc
commit
bd7970fb1f
@ -74,10 +74,10 @@ if (window.matchMedia('(pointer: coarse)').matches) {
|
||||
}
|
||||
|
||||
if (touchEndX - touchStartX > swipeThreshold) {
|
||||
showMenu();
|
||||
hideMenu();
|
||||
event.stopPropagation();
|
||||
} else if (touchStartX - touchEndX > swipeThreshold) {
|
||||
hideMenu();
|
||||
showMenu();
|
||||
event.stopPropagation();
|
||||
}
|
||||
});
|
||||
@ -86,6 +86,6 @@ if (window.matchMedia('(pointer: coarse)').matches) {
|
||||
// Add a floating panel to the bottom of the page to show a message when the filters are hidden
|
||||
const floatingPanel = document.createElement('div');
|
||||
floatingPanel.setAttribute('style', 'position: fixed; bottom: 0; left: 0; right: 0; background-color: #fff; padding: 1em; text-align: center; display: block; border-top: 1px solid #ccc; box-shadow: 0 0 -5px #eee;');
|
||||
floatingPanel.innerHTML = '← right/left open/close the filters →';
|
||||
floatingPanel.innerHTML = '← swipe left to open filters ←';
|
||||
document.body.appendChild(floatingPanel);
|
||||
}
|
Loading…
Reference in New Issue
Block a user