Skip to content

Commit 56ca096

Browse files
committed
refactor: thinner hooks
1 parent e6c6193 commit 56ca096

48 files changed

Lines changed: 5336 additions & 4245 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/web/src/animation/timeline-snap-points.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { getElementKeyframes } from "@/animation";
22
import type { SceneTracks } from "@/timeline";
33
import type { SnapPoint } from "@/timeline/snapping";
4+
import { addMediaTime } from "@/wasm";
45

56
export function getAnimationKeyframeSnapPointsForTimeline({
67
tracks,
@@ -22,7 +23,7 @@ export function getAnimationKeyframeSnapPointsForTimeline({
2223
animations: element.animations,
2324
})) {
2425
snapPoints.push({
25-
time: element.startTime + keyframe.time,
26+
time: addMediaTime({ a: element.startTime, b: keyframe.time }),
2627
type: "keyframe",
2728
elementId: element.id,
2829
trackId: track.id,

0 commit comments

Comments
 (0)