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.83k stars 1.26k forks source link

How to set the cropzone? #889

Open mayurtakawale88 opened 9 months ago

mayurtakawale88 commented 9 months ago

Summary I am trying to set the cropzone, but it's throwing an error

Screenshots

image

imageEditor.setCropzoneRect(1.5) // I have tried with multiple numbers but none of them is working Version 3.15.2

Additional context I am implementing the image editor on vue3, but when I am going for crop implementation it's throwing an error, please find the implementation

const editorInstance= new ImageEditor( tuiImageEditor.value, {
    cssMaxWidth: 700,
    cssMaxHeight: 400,
    selectionStyle: {
      cornerSize: 20,
      rotatingPointOffset: 70,
      borderColor: '#FFFFFF',
    },
    usageStatistics: false,
  })
  await editorInstance.loadImageFromURL(
    'https://storage.googleapis.com/ghl-test/o6241QsiRwUIJHyjuhos/media/64d51c8a9060cd44ef7fb56f.jpeg',
    'image'
  )
  await editorInstance.setCropzoneRect(1.5)
tejas36026 commented 6 months ago

hey did you solved it?

tejas36026 commented 6 months ago

you can simply write this and the problem will be solved initMenu: 'crop'