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