File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,8 @@ export function next() {
46
46
47
47
export async function prev ( ) {
48
48
if ( clicks . value <= 0 )
49
- prevSlide ( )
49
+ await prevSlide ( )
50
+
50
51
else
51
52
clicks . value -= 1
52
53
}
@@ -60,9 +61,11 @@ export function nextSlide() {
60
61
return go ( next )
61
62
}
62
63
63
- export function prevSlide ( ) {
64
+ export async function prevSlide ( lastClicks = true ) {
64
65
const next = Math . max ( 1 , currentPage . value - 1 )
65
- return go ( next )
66
+ await go ( next )
67
+ if ( lastClicks )
68
+ clicks . value = clicksTotal . value
66
69
}
67
70
68
71
export function go ( page : number ) {
Original file line number Diff line number Diff line change @@ -14,9 +14,9 @@ export function registerShotcuts() {
14
14
shortcut ( 'space' , next )
15
15
shortcut ( 'right' , next )
16
16
shortcut ( 'left' , prev )
17
- shortcut ( 'up' , prevSlide )
17
+ shortcut ( 'up' , ( ) => prevSlide ( false ) )
18
18
shortcut ( 'down' , nextSlide )
19
- shortcut ( 'shift_left' , prevSlide )
19
+ shortcut ( 'shift_left' , ( ) => prevSlide ( false ) )
20
20
shortcut ( 'shift_right' , nextSlide )
21
21
shortcut ( 'd' , toggleDark )
22
22
shortcut ( 'f' , ( ) => fullscreen . toggle ( ) )
You can’t perform that action at this time.
0 commit comments