Update
This commit is contained in:
@@ -127,6 +127,16 @@ const VideoPreview = ({
|
||||
}
|
||||
};
|
||||
|
||||
// Pre-select first text node on load
|
||||
useEffect(() => {
|
||||
if (activeElements.length > 0 && !selectedElementId) {
|
||||
const firstTextElement = activeElements.find(element => element.type === 'text');
|
||||
if (firstTextElement) {
|
||||
setSelectedElementId(firstTextElement.id);
|
||||
}
|
||||
}
|
||||
}, [activeElements, selectedElementId, setSelectedElementId]);
|
||||
|
||||
// Update transformer when selection changes
|
||||
useEffect(() => {
|
||||
if (transformerRef.current) {
|
||||
|
||||
Reference in New Issue
Block a user