Update
This commit is contained in:
@@ -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>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user