don't play animation when startTime is set to null

This commit is contained in:
Pierre Tachoire
2026-02-19 10:41:07 +01:00
parent 9939797792
commit d75f5f9231

View File

@@ -151,6 +151,12 @@ pub fn getStartTime(self: *const Animation) ?f64 {
pub fn setStartTime(self: *Animation, value: ?f64, page: *Page) !void { pub fn setStartTime(self: *Animation, value: ?f64, page: *Page) !void {
self._startTime = value; self._startTime = value;
// if the startTime is null, don't play the animation.
if (value == null) {
return;
}
return self.play(page); return self.play(page);
} }