1

In my angular 9 project I use ngx-image-cropper and it is working fine. This is my cropper code:

<image-cropper
  [imageChangedEvent]="imageChangedEvent"
  [imageURL]="imageUrl"
  [transform]="transform"
  [maintainAspectRatio]="true"
  [aspectRatio]="aspectRatio"
  [canvasRotation]="canvasRotation"
  (imageCropped)="imageCropped($event)"
></image-cropper>

I can use cropper in landscape, portrait and square shapes, also scale, rotate, flip, reset cropped image. But when I change cropper width the height changes depending on the width. How can I change only the length or width of a cropper.enter image description here

Shushan
  • 53
  • 2
  • 8

1 Answers1

3

Try to change

  [maintainAspectRatio]="false"
LogicBlower
  • 1,250
  • 1
  • 8
  • 14