【问题标题】:ngx-image-cropper - how change only the length or width of a cropperngx-image-cropper - 如何仅更改裁剪器的长度或宽度
【发布时间】:2020-10-12 10:58:12
【问题描述】:

在我的 Angular 9 项目中,我使用了 ngx-image-cropper,它运行良好。这是我的裁剪代码:

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

我可以在横向、纵向和方形中使用裁剪器,还可以缩放、旋转、翻转、重置裁剪的图像。但是当我改变裁剪器宽度时,高度会根据宽度而变化。如何只更改裁剪器的长度或宽度。enter image description here

【问题讨论】:

    标签: angular cropper


    【解决方案1】:

    尝试改变

      [maintainAspectRatio]="false"
    

    【讨论】:

    • 非常感谢,帮了大忙。
    猜你喜欢
    • 2021-05-04
    • 1970-01-01
    • 2020-11-01
    • 2018-11-02
    • 2020-04-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多