From 4838bbe73ebfe33f6fdb1811c37440d0472abfce Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 18 Apr 2026 22:03:20 +0800 Subject: [PATCH] Tune LibTV composer size and image dragging --- .../canvas/LiblibVideoCanvasReplica.tsx | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/components/canvas/LiblibVideoCanvasReplica.tsx b/components/canvas/LiblibVideoCanvasReplica.tsx index 074a299b8..219cb1e53 100644 --- a/components/canvas/LiblibVideoCanvasReplica.tsx +++ b/components/canvas/LiblibVideoCanvasReplica.tsx @@ -30,6 +30,7 @@ import { import { useRouter } from "next/navigation"; import { type ChangeEvent as ReactChangeEvent, + type DragEvent as ReactDragEvent, type MouseEvent as ReactMouseEvent, type PointerEvent as ReactPointerEvent, type ReactNode, @@ -329,7 +330,7 @@ const OFFICIAL_NODE_GAP = 100; const OFFICIAL_TEXT_RESOURCE_HEIGHT = 232; const OFFICIAL_TEXT_RESOURCE_WIDTH = 350; const OFFICIAL_IMAGE_TOOLBAR_SCALE = 0.7; -const OFFICIAL_COMPOSER_SCALE = 0.47; +const OFFICIAL_COMPOSER_SCALE = 0.6; const PROMPT_COMPOSER_BASE_WIDTH = 895; const PROMPT_COMPOSER_BASE_HEIGHT = 286; const PRESET_COMPOSER_BASE_HEIGHT = 238; @@ -989,6 +990,10 @@ function getNodeMediaUrl(node: CloneNode | null | undefined) { return Array.isArray(urls) && typeof urls[0] === "string" ? urls[0] : ""; } +function preventNativeImageDrag(event: ReactDragEvent) { + event.preventDefault(); +} + function getPresetMode(node: CloneNode | null | undefined): ActiveStarterScene { const value = getDraftString(node, "targetPreset"); if ( @@ -4502,7 +4507,13 @@ function CloneCanvasNode({ > {previewUrl ? ( <> - + ) : null} @@ -4837,7 +4848,9 @@ function PresetMediaCanvasNode({ node, selected }: { node: CloneNode; selected: {mediaUrl ? ( {node.title}