This commit is contained in:
ct
2025-07-04 21:42:27 +08:00
parent 609ea955c2
commit 115eb3f6a5

View File

@@ -130,7 +130,7 @@ const VideoPreview = ({
// Pre-select first text node on load // Pre-select first text node on load
useEffect(() => { useEffect(() => {
if (activeElements.length > 0 && !selectedElementId) { if (activeElements.length > 0 && !selectedElementId) {
const firstTextElement = activeElements.find(element => element.type === 'text'); const firstTextElement = activeElements.find((element) => element.type === 'text');
if (firstTextElement) { if (firstTextElement) {
setSelectedElementId(firstTextElement.id); setSelectedElementId(firstTextElement.id);
} }
@@ -267,8 +267,8 @@ const VideoPreview = ({
{isSelected && ( {isSelected && (
<Html <Html
groupProps={{ groupProps={{
x: element.x - (element.offsetX || 0), x: element.x - (element.offsetX || 0) - 10,
y: element.y - 50, y: element.y - 70,
}} }}
divProps={{ divProps={{
style: { style: {
@@ -277,14 +277,14 @@ const VideoPreview = ({
}} }}
> >
<Button <Button
size="icon" id="open-text-editor"
className="h-12 w-12 rounded-full border shadow-sm" className="h-16 w-16 rounded-full border shadow-sm"
onClick={() => { onClick={() => {
handleElementSelect(element.id); handleElementSelect(element.id);
onOpenTextSidebar(); onOpenTextSidebar();
}} }}
> >
<Type className="h-8 w-8" /> <Type className="size-6" />
</Button> </Button>
</Html> </Html>
)} )}