Interface

UseTimelineSnappingResult

Result returned by `useTimelineSnapping`.

Signature

Type Definition
Interface UseTimelineSnappingResult

Properties

NameSignatureDescription
activeTargetactiveTarget: TimelineSnapTarget | nullCurrently active snap target, or null when nothing is snapped.
enabledenabled: booleanWhether magnetic snapping is enabled.
feedbackfeedback: TimelineSnapFeedbackCurrent transient snap feedback for canvas guides and UI status.
prepareSnapping(options?: string | SnapPreparationOptions): TimelineCommandResultPrepares snap targets for an upcoming interaction.
resolveSnap(time: RationalTime, publishFeedback?: boolean): TimelineSnapResult | nullResolves a candidate time against the prepared snap target index.
setEnabled(enabled: boolean): TimelineCommandResultEnables or disables magnetic snapping.
setThresholdPixels(thresholdPixels: number): TimelineCommandResultSets the magnetic snap radius in screen pixels.
settle(): TimelineCommandResultFinalizes an interaction and clears transient snap feedback.
thresholdPixelsthresholdPixels: numberMagnetic snap radius in screen pixels.