Open k-min9 opened 2 years ago
Hello, I'm using react for my project
this is my first addImageObject API
code
const editorAddImage = () => {editorRef.current.getInstance().addImageObject(logoImg);}
and following is the result
and I want to change the size of added ImageObject (I wanted to resize it to fit the canvas.) So, I wrote code like this
const editorAddImage = () => { editorRef.current.getInstance().addImageObject(logoImg) .then(res => { const editorInstance = editorRef.current.getInstance(); var canvasSize = editorInstance.getCanvasSize(); editorInstance.setObjectProperties(res.id, {width:canvasSize.width, height:canvasSize.height - 10} )} );}
I wanted to be like this
and this is the result
am I using wrong API??
@k-min9 It's like a bug. I'll try to fix it. Thank you for your information.
still now?
Hello, I'm using react for my project
this is my first addImageObject API
code
and following is the result
and I want to change the size of added ImageObject (I wanted to resize it to fit the canvas.) So, I wrote code like this
I wanted to be like this
and this is the result
am I using wrong API??