Add more open options
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
This commit is contained in:
parent
33adb35923
commit
08163f86bf
@ -14,9 +14,11 @@
|
|||||||
<image-cropper #imageCropper
|
<image-cropper #imageCropper
|
||||||
[imageChangedEvent]="imageChangedEvent"
|
[imageChangedEvent]="imageChangedEvent"
|
||||||
[maintainAspectRatio]="true"
|
[maintainAspectRatio]="true"
|
||||||
format="jpeg"
|
[format]="imageType"
|
||||||
[aspectRatio]="aspectRatio"
|
[aspectRatio]="aspectRatio"
|
||||||
[autoCrop]="true"
|
[autoCrop]="true"
|
||||||
|
[resizeToWidth]="maxWidth"
|
||||||
|
[roundCropper]="roundImage"
|
||||||
(imageCropped)="imageCropped($event)"
|
(imageCropped)="imageCropped($event)"
|
||||||
(imageLoaded)="imageLoaded($event)"
|
(imageLoaded)="imageLoaded($event)"
|
||||||
(cropperReady)="cropperReady()"
|
(cropperReady)="cropperReady()"
|
||||||
|
@ -22,14 +22,20 @@ export class EditImageModalComponent implements OnInit {
|
|||||||
croppedImage: string = '';
|
croppedImage: string = '';
|
||||||
endpointUrl:string = null;
|
endpointUrl:string = null;
|
||||||
imageUrl:string = null;
|
imageUrl:string = null;
|
||||||
|
maxWidth:number = 200;
|
||||||
|
roundImage:boolean = false;
|
||||||
|
imageType:string = "jpeg";
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
}
|
}
|
||||||
|
|
||||||
open(endpoint:string,aspectRatio:number) {
|
open(endpoint:string,aspectRatio:number,roundImage?:boolean,maxWidth?:number, imageType?:string) {
|
||||||
this.endpointUrl = endpoint;
|
this.endpointUrl = endpoint;
|
||||||
this.imageUrl = endpoint;
|
this.imageUrl = endpoint;
|
||||||
this.aspectRatio= aspectRatio;
|
this.aspectRatio= aspectRatio;
|
||||||
|
this.roundImage = roundImage === undefined?this.roundImage:roundImage;
|
||||||
|
this.maxWidth = maxWidth === undefined?this.maxWidth:maxWidth;
|
||||||
|
this.imageType = imageType === undefined?this.imageType:imageType.substr(6);
|
||||||
this.modalService.open(this.modal,{ size: 'lg' });
|
this.modalService.open(this.modal,{ size: 'lg' });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user