Open TmVukov opened 5 months ago
Obviously, that option exists, but when i try to replicate it, i'm getting errors.
So i'm literally trying to implement this code from your "service-basic.js" file, which, as far as I can see, starts the custom crop mode:
$btnCrop.on('click', function () { imageEditor.startDrawingMode('CROPPER'); $displayingSubMenu.hide(); $displayingSubMenu = $cropSubMenu.show(); });
The example code in React would be something like this:
const handleCustomCrop = () => { if (editorRef.current) { const imageEditor = editorRef.current.getInstance() imageEditor.startDrawingMode('CROPPER') } }
This shows the plus icon to start cropping, but when I try to do that i get this error?
Cannot read properties of null (reading 'set') TypeError: Cannot read properties of null (reading 'set') at Cropper._onFabricMouseMove (http://localhost:3000/static/js/bundle.js:518311:24) at klass.fire (http://localhost:3000/static/js/bundle.js:472426:60) at klass._handleEvent (http://localhost:3000/static/js/bundle.js:484075:20) at klass.__onMouseMove (http://localhost:3000/static/js/bundle.js:484338:20) at klass._onMouseMove (http://localhost:3000/static/js/bundle.js:483922:20)
遇到了同样的问题
Obviously, that option exists, but when i try to replicate it, i'm getting errors.
So i'm literally trying to implement this code from your "service-basic.js" file, which, as far as I can see, starts the custom crop mode:
The example code in React would be something like this:
This shows the plus icon to start cropping, but when I try to do that i get this error?