mirror of
https://github.com/OpenCut-app/OpenCut.git
synced 2026-07-13 21:52:53 +02:00
feat: ripple support for element resize
This commit is contained in:
@@ -40,7 +40,9 @@ export function useTimelineElementResize({
|
||||
const activeProject = editor.project.getActive();
|
||||
const isShiftHeldRef = useShiftKey();
|
||||
const snappingEnabled = useTimelineStore((state) => state.snappingEnabled);
|
||||
|
||||
const rippleEditingEnabled = useTimelineStore(
|
||||
(state) => state.rippleEditingEnabled,
|
||||
);
|
||||
|
||||
const [resizing, setResizing] = useState<ResizeState | null>(null);
|
||||
const [currentTrimStart, setCurrentTrimStart] = useState(element.trimStart);
|
||||
@@ -354,6 +356,7 @@ export function useTimelineElementResize({
|
||||
trimEnd: finalTrimEnd,
|
||||
startTime: startTimeChanged ? finalStartTime : undefined,
|
||||
duration: durationChanged ? finalDuration : undefined,
|
||||
rippleEnabled: rippleEditingEnabled,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -366,6 +369,7 @@ export function useTimelineElementResize({
|
||||
element.id,
|
||||
onResizeStateChange,
|
||||
onSnapPointChange,
|
||||
rippleEditingEnabled,
|
||||
]);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user