-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to upload the image on click canvas area instead of speared upload button #286
Comments
do you still need help? |
yes, @web-dave |
how do you trigger the input dialog? <input *ngIf="!settings.noFileInput" #fileInput type="file" accept="image/*" (change)="fileChangeListener($event)"> and in the onMouseDown @ViewChild("fileInput") fileInput: ElementRef;
public onMouseDown(event: MouseEvent): void {
this.cropper.onMouseDown(event);
if (!this.cropper.isImageSet() && !this.settings.noFileInput) {
// load img
this.fileInput.nativeElement.click();
}
} |
That's one way. but I'll test it tonight. |
Hi @web-dave , i got error: I am using |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to upload the image on click canvas area instead of speared upload button,
The text was updated successfully, but these errors were encountered: