From f1ce3f20bafaac2558233d5720594c82663e285b Mon Sep 17 00:00:00 2001 From: Pradeep Senthil Date: Sat, 23 Mar 2024 19:24:46 -0500 Subject: [PATCH] Fix object selection by saving on object modification (#95) --- src/ui_elements/Components/fabric_canvas.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui_elements/Components/fabric_canvas.js b/src/ui_elements/Components/fabric_canvas.js index 2636f3e..4d67dab 100755 --- a/src/ui_elements/Components/fabric_canvas.js +++ b/src/ui_elements/Components/fabric_canvas.js @@ -100,8 +100,9 @@ export default function FabricRender(props){ opt.e.stopPropagation(); }); - temp_fabricCanvas.on('object:moving', function (event) { + temp_fabricCanvas.on('object:modified', function (event) { this.objDrag = true; + updateFrameData(currframe_redux, temp_fabricCanvas.getObjects()) }); temp_fabricCanvas.on('mouse:down', function(opt) { @@ -125,7 +126,6 @@ export default function FabricRender(props){ } }); temp_fabricCanvas.on('mouse:up', function(opt) { - updateFrameData(currframe_redux, temp_fabricCanvas.getObjects()) if(this.objDrag){ this.objDrag = false; }