Skip to content

Commit 630f00d

Browse files
committed
Latest
1 parent 5f7aa97 commit 630f00d

File tree

3 files changed

+7
-27
lines changed

3 files changed

+7
-27
lines changed

dev/html/public/playwright/animate/animate-cancel.html

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,9 @@
5151
mini.finished.then(() => {
5252
miniElement.innerHTML = "finished"
5353
})
54-
js.finished
55-
.then(() => {
56-
jsElement.innerHTML = "finished"
57-
})
58-
.catch(() => {
59-
console.log("js rejected")
60-
})
54+
js.finished.then(() => {
55+
jsElement.innerHTML = "finished"
56+
})
6157
waapi.finished.then(() => {
6258
waapiElement.innerHTML = "finished"
6359
})

dev/html/public/playwright/animate/animate-stop.html

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,26 +44,16 @@
4444
options
4545
)
4646

47-
mini.then(() => {
47+
mini.finished.then(() => {
4848
document.getElementById("mini").innerHTML = "finished"
4949
})
50-
js.then(() => {
50+
js.finished.then(() => {
5151
document.getElementById("js").innerHTML = "finished"
5252
})
53-
waapi.then(() => {
53+
waapi.finished.then(() => {
5454
document.getElementById("waapi").innerHTML = "finished"
5555
})
5656

57-
// mini.finished.then(() => {
58-
// document.getElementById("mini").innerHTML = "finished"
59-
// })
60-
// js.finished.then(() => {
61-
// document.getElementById("js").innerHTML = "finished"
62-
// })
63-
// waapi.finished.then(() => {
64-
// document.getElementById("waapi").innerHTML = "finished"
65-
// })
66-
6757
delay(() => {
6858
mini.stop()
6959
js.stop()
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { noop } from "motion-utils"
21
import { GroupAnimation } from "./GroupAnimation"
32
import { AnimationPlaybackControlsWithThen } from "./types"
43

@@ -7,11 +6,6 @@ export class GroupAnimationWithThen
76
implements AnimationPlaybackControlsWithThen
87
{
98
then(onResolve: VoidFunction, _onReject?: VoidFunction) {
10-
return this.finished
11-
.then(() => {
12-
onResolve()
13-
console.log("onResolve")
14-
})
15-
.catch(noop)
9+
return this.finished.finally(onResolve).then(() => {})
1610
}
1711
}

0 commit comments

Comments
 (0)