Skip to content

Commit 7de2b03

Browse files
committed
animated-outlet: rename beforeAdd to beforeEnter
1 parent 09ff695 commit 7de2b03

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/components/animated-outlet.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class AnimationHook {
1515
return this.hasOption(outlet, 'parallel')
1616
}
1717

18-
beforeAdd (outlet, el) {
18+
beforeEnter (outlet, el) {
1919

2020
}
2121

@@ -140,7 +140,7 @@ function runTransition (el, name, type, cb) {
140140
}
141141

142142
class GenericCSS extends AnimationHook {
143-
beforeAdd (outlet, el) {
143+
beforeEnter (outlet, el) {
144144
const name = outlet.getAttribute('animation') || 'outlet'
145145
el.classList.add(`${name}-enter`)
146146
}
@@ -158,7 +158,7 @@ class GenericCSS extends AnimationHook {
158158
}
159159

160160
export class AnimateCSS extends AnimationHook {
161-
beforeAdd (outlet, el) {
161+
beforeEnter (outlet, el) {
162162
const enter = this.getOption(outlet, 'enter')
163163
if (enter) {
164164
el.style.display = 'none'
@@ -218,7 +218,7 @@ export class AnimatedOutlet extends HTMLElement {
218218
const hook = getAnimationHook(this.getAttribute('animation'))
219219
const runParallel = hook.runParallel(this)
220220

221-
hook.beforeAdd(this, el)
221+
hook.beforeEnter(this, el)
222222
super.appendChild(el)
223223
if (!runParallel && this.removing) {
224224
// when removing a previous el, append animation is run after remove one

0 commit comments

Comments
 (0)