Skip to content

Commit 1436140

Browse files
authored
Merge pull request #455 from marp-team/inconsistent-transition-in-backward-navigation-via-presenter
Fix inconsistent transition by backward navigation via presenter view
2 parents bbdf173 + 02ec9ed commit 1436140

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
### Fixed
66

7+
- [Experimental transition] Fix inconsistent transition by backward navigation via presenter view ([#452](https://github.com/marp-team/marp-cli/issues/452), [#455](https://github.com/marp-team/marp-cli/pull/455))
78
- Preview mode has unexpected message in the information bar "You are using an unsupported command-line flag" ([#453](https://github.com/marp-team/marp-cli/issues/453), [#454](https://github.com/marp-team/marp-cli/pull/454))
89

910
## v2.0.0 - 2022-05-24

src/templates/bespoke/transition.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@ const bespokeTransition = (deck) => {
115115
return false
116116
}
117117

118+
// Check condition
119+
// (The conditional function may modify event object so should be called at first of checks)
120+
if (!cond(e)) return true
121+
118122
// Check transition
119123
const current = deck.slides[deck.slide()]
120124
const isBack = () => e.back ?? back
@@ -124,9 +128,6 @@ const bespokeTransition = (deck) => {
124128
)
125129
if (!section) return true
126130

127-
// Check condition
128-
if (!cond(e)) return true
129-
130131
// Parse settings
131132
const transitionData = parseTransitionData(
132133
section.getAttribute(transitionDataTarget) ?? undefined

0 commit comments

Comments
 (0)