mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-25 01:08:50 +01:00
Fix bounce effect bug when switching view modes
This commit is contained in:
parent
8efc7a226e
commit
c609ba0194
1 changed files with 8 additions and 0 deletions
|
@ -641,6 +641,14 @@ function StatusThread({ id, closeLink = '/', instance: propInstance }) {
|
|||
} ${initialPageState.current === 'status' ? 'slide-in' : ''} ${
|
||||
viewMode ? `deck-view-${viewMode}` : ''
|
||||
}`}
|
||||
onAnimationEnd={(e) => {
|
||||
// Fix the bounce effect when switching viewMode
|
||||
// `slide-in` animation kicks in when switching viewMode
|
||||
if (initialPageState.current === 'status') {
|
||||
// e.target.classList.remove('slide-in');
|
||||
initialPageState.current = null;
|
||||
}
|
||||
}}
|
||||
>
|
||||
<header
|
||||
class={`${heroInView ? 'inview' : ''} ${
|
||||
|
|
Loading…
Reference in a new issue