feat(studio): always-on crop with reposition handle, drop crop mode (#2090)

Crop is now part of the element selection instead of a separate mode. Selecting
a croppable element shows edge handles just outside each side and, once cropped,
the full content with the cropped-away area dimmed plus a center reposition
handle to pan the crop window. Dragging the body moves the element, edge handles
crop, the center handle pans; corners stay free for the resize handle. Removes
the crop-mode toggle (toolbar + property-panel buttons), the cropMode/
cropAvailable player-store state, and the double-click-to-crop gesture. The
clip-path inset model is unchanged.
This commit is contained in:
Miguel Ángel
2026-07-08 22:24:26 -04:00
committed by GitHub
parent 6f0b57d608
commit 623f91d6a1
15 changed files with 217 additions and 307 deletions
-4
View File
@@ -37,7 +37,6 @@ import {
import type { DomEditSelection } from "./components/editor/domEditing";
import { StudioHeader } from "./components/StudioHeader";
import { useGestureCommit } from "./hooks/useGestureCommit";
import { useCropModeProps } from "./hooks/useCropMode";
import { STUDIO_KEYFRAMES_ENABLED } from "./components/editor/manualEditingAvailability";
import { GestureTrailOverlay } from "./components/editor/GestureTrailOverlay";
import { StudioLeftSidebar } from "./components/StudioLeftSidebar";
@@ -83,7 +82,6 @@ export function StudioApp() {
const [refreshKey, setRefreshKey] = useState(0);
const [previewDocumentVersion, setPreviewDocumentVersion] = useState(0);
const [blockPreview, setBlockPreview] = useState<BlockPreviewInfo | null>(null);
const cropModeProps = useCropModeProps();
const previewIframeRef = useRef<HTMLIFrameElement | null>(null);
const activeCompPathRef = useRef(activeCompPath);
activeCompPathRef.current = activeCompPath;
@@ -542,7 +540,6 @@ export function StudioApp() {
recordingState={gestureState}
onToggleRecording={recordingToggle}
blockPreview={blockPreview}
{...cropModeProps}
gestureOverlay={
gestureState === "recording" && previewIframe ? (
<GestureTrailOverlay
@@ -571,7 +568,6 @@ export function StudioApp() {
reloadPreview={reloadPreview}
domEditSaveTimestampRef={domEditSaveTimestampRef}
recordEdit={editHistory.recordEdit}
{...cropModeProps}
onToggleElementHidden={timelineEditing.handleToggleElementHidden}
/>
)}