mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-21 20:24:42 +00:00
Merge pull request #1601 from lightpanda-io/animation-cancel
Some checks failed
e2e-test / zig build release (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
e2e-test / cdp-and-hyperfine-bench (push) Has been cancelled
e2e-test / perf-fmt (push) Has been cancelled
e2e-test / browser fetch (push) Has been cancelled
zig-test / zig test using v8 in debug mode (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
Some checks failed
e2e-test / zig build release (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
e2e-test / cdp-and-hyperfine-bench (push) Has been cancelled
e2e-test / perf-fmt (push) Has been cancelled
e2e-test / browser fetch (push) Has been cancelled
zig-test / zig test using v8 in debug mode (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
implement Animation.cancel()
This commit is contained in:
@@ -87,8 +87,11 @@ pub fn pause(self: *Animation) void {
|
||||
self._playState = .paused;
|
||||
}
|
||||
|
||||
pub fn cancel(_: *Animation) void {
|
||||
log.warn(.not_implemented, "Animation.cancel", .{});
|
||||
pub fn cancel(self: *Animation) void {
|
||||
// Transition to idle. If the animation was .running, the already-scheduled
|
||||
// update() callback will fire but see .idle state, skip the finish
|
||||
// transition, and release the strong ref via weakRef() as normal.
|
||||
self._playState = .idle;
|
||||
}
|
||||
|
||||
pub fn finish(self: *Animation, page: *Page) void {
|
||||
|
||||
Reference in New Issue
Block a user