Closed satsangswami closed 2 years ago
I have Implemented the Component.
In .ts `output?: NgxCroppedEvent; image?: any; constructor(private service: NgxPhotoEditorService) { }
fileChangeHandler($event: any) { this.image = $event; }
close($event) { console.log($event); this.image = null; }
error($event) { console.log($event); }
croppedImage($event) {
console.log($event); this.output = $event; this.image = null;
}`
in .HTML
`<input type="file" (change)="fileChangeHandler($event)">
<img [src]="output?.base64" alt="" style="width: 100%;">
When we check in the Desktop Mode, it works as intended. But when we open inspector change to Mobile view, it requires and extra click to close the Editor Popup after Apply.
@AhamedBilal You can also try with the online demo https://ahamedbilal.github.io/ngx-photo-editor/
Thanks for pointing out the issue Fixed it on ngx-photo-editor@0.4.4 update the version to 0.4.4
I have Implemented the Component.
In .ts `output?: NgxCroppedEvent; image?: any; constructor(private service: NgxPhotoEditorService) { }
fileChangeHandler($event: any) { this.image = $event; }
close($event) { console.log($event); this.image = null; }
error($event) { console.log($event); }
croppedImage($event) {
}`
in .HTML
`<input type="file" (change)="fileChangeHandler($event)">
<img [src]="output?.base64" alt="" style="width: 100%;">
<lib-ngx-photo-editor *ngIf="image" [source]="image" [hideModalHeader]="true" (closeEvent)="close($event)" (errorEvent)="error($event)" (imageCroppedEvent)="croppedImage($event)"> `
When we check in the Desktop Mode, it works as intended. But when we open inspector change to Mobile view, it requires and extra click to close the Editor Popup after Apply.
@AhamedBilal You can also try with the online demo https://ahamedbilal.github.io/ngx-photo-editor/