Cropperjs Crop Circle

时间:2018-03-09 17:48:44

标签: angular typescript cropperjs

如何将cropperjs裁剪区域设置为圆圈。 我使用angular / typescript和ngx-img模块。

这是我的component.html代码:

 <ngx-img (onSelect)="imgEditorOnSelect($event)"
          (onReset)="imgEditorOnReset()"
          [config]="img_editor_config">
 </ngx-img>

我的component.ts代码:

ngOnInit() {

    /**
     * configuracion para el cropperjs
     * https://fengyuanchen.github.io/cropperjs/
     */
    this.img_editor_config = {
        crop: [{ ratio: 2 / 3, viewMode: 3 }]
    }
}

0 个答案:

没有答案