ISSUE 3: add paste functionality

This commit is contained in:
Ayobami
2025-07-02 16:50:40 +01:00
parent 00f9c602af
commit 3e3ea34e5f
@@ -523,6 +523,19 @@ export const DockBuilder = () => {
const PasteSelection = () => { const PasteSelection = () => {
// TODO: Paste selection // TODO: Paste selection
if (clipboard) {
clipboard.clone(function (clonedObj) {
// Offset the pasted object so it's visible
clonedObj.set({
left: (clonedObj.left || 0) + 20,
top: (clonedObj.top || 0) + 20,
evented: true,
});
editorMemo.add(clonedObj);
editorMemo.setActiveObject(clonedObj);
editorMemo.renderAll();
});
}
}; };
const onDeleteSelection = () => { const onDeleteSelection = () => {