nhn / tui.image-editor

🍞🎨 Full-featured photo image editor using canvas. It is really easy, and it comes with great filters.
http://ui.toast.com/tui-image-editor
MIT License
6.98k stars 1.29k forks source link

Problem => .setCropzoneRatio is not a function #871

Open SuhatAkbulak opened 1 year ago

SuhatAkbulak commented 1 year ago

Hello, I get such error to resize the image.

Ekran Resmi 2023-06-10 18 50 26

` const handleClickButton = () => {

console.log(editorRef.current);
const editorInstance = editorRef.current.getInstance();

editorInstance.setCropzoneRatio(16 / 9)

// editorInstance.crop(16 / 9); 

//imageEditor.crop(imageEditor.getCropzoneRect());
editorInstance.setCropzoneRatio(16 / 9);

editorInstance.crop(editorInstance.setCropzoneRatio(16 / 9));

}; `