can shape edit + when add shape is default selected
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { useEditorStore, type ToolType } from "../../../store/editorStore";
|
||||
import { useEditorStore, type ToolType } from "@/pages/editor/store/editorStore";
|
||||
import Input from "@/components/Input";
|
||||
|
||||
const VideoInput = () => {
|
||||
@@ -20,8 +20,10 @@ const VideoInput = () => {
|
||||
height: 300,
|
||||
videoUrl: input.value,
|
||||
};
|
||||
const { addObject } = useEditorStore.getState();
|
||||
const { addObject, setSelectedObjectId, setTool } = useEditorStore.getState();
|
||||
addObject(newVideo);
|
||||
setSelectedObjectId(newVideo.id);
|
||||
setTool("select");
|
||||
input.value = "";
|
||||
}
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user