I have searched and cannot find the solution I am looking for with ngx-cropper. What I would like is for the cropper area to be in top left corner when I open it and about 1/6th the size of the image like this:
I have got this using a static width and height:
<image-cropper
[imageChangedEvent]="imageChangedEvent"
[maintainAspectRatio]="false"
[cropperStaticHeight]= "100"
[cropperStaticWidth]= "125"
[resizeToWidth]="0"
format="png"
(imageCropped)="imageCropped($event)"
(imageLoaded)="imageLoaded()"
(cropperReady)="cropperReady()"
(loadImageFailed)="loadImageFailed()"
></image-cropper>
However I would also like to be able to adjust it so it can increase or decrease in size.
I though this would have worked (setting an initial positon) but it didn't :
cropper To be able to overwrite the cropper coordinates, you can use this input. Create a new object of type CropperPosition and assign it to this input. Make sure to create a new object each time you wish to overwrite the cropper's position and wait for the cropperReady event to have fired.
cropperPosition: CropperPosition = {
x1: 0,
y1: 0,
x2: 125,
y2: 100
};
Does anyone know how I can achieve this?