We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
key('left', function (e) { let activeObject = canvasFabric.getActiveObjects(); if(activeObject.length !== 0){ e.preventDefault(); activeObject.forEach(function (object) { object.left -= 5; object.setCoords(); canvasFabric.renderAll(); }); } });
Originally posted by @AnurajRicky in #858 (comment)
The text was updated successfully, but these errors were encountered:
I found a solution
let activeObject = canvasFabric.getActiveObjects(); if (canvasFabric.getActiveObject().type === 'activeSelection') { let groped = canvasFabric.getActiveObject().toGroup(); groped.left -= 5; canvasFabric.renderAll(); canvasFabric.getActiveObject().toActiveSelection(); canvasFabric.requestRenderAll(); } else { activeObject.forEach((object) => { object.left -= 5; canvasFabric.renderAll(); }) }
Sorry, something went wrong.
let activeObject = canvasFabric.getActiveObject(); activeObject.left -= 5; activeObject.setCoords(); canvasFabric.renderAll();
Does not work always in any condition?
No branches or pull requests
key('left', function (e) { let activeObject = canvasFabric.getActiveObjects(); if(activeObject.length !== 0){ e.preventDefault(); activeObject.forEach(function (object) { object.left -= 5; object.setCoords(); canvasFabric.renderAll(); }); } });
Originally posted by @AnurajRicky in #858 (comment)
The text was updated successfully, but these errors were encountered: