advanced-cropper / vue-advanced-cropper

The advanced vue cropper library that gives you opportunity to create your own croppers suited for any website design
https://advanced-cropper.github.io/vue-advanced-cropper/
Other
930 stars 128 forks source link

How to use defaultVisibleArea with values that have a very narrow or very wide size of square stencil #269

Closed Kagayakashi closed 3 months ago

Kagayakashi commented 3 months ago

For example if there is:

  1. height 150px and width 1000px
  2. or width 1000px and height 150px.

Square stencil always remain close to square. But i need dynamic aspect ratio, like it is not set

https://codesandbox.io/p/sandbox/sweet-panini-2g9rwx

How to do it?

Kagayakashi commented 3 months ago

So, this defaultVisibleArea is not usable if I want to show current (already cropped image) if user clicks "Edit" in UI. Maybe I was just wrong using it, i dont know. I fixed my problem with cropperRef.value.setCoordinates(coordinates) with vue3 watch.