Skip to content
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 reset preview #38

Open
phamtranquocviet opened this issue Mar 8, 2019 · 1 comment
Open

How to reset preview #38

phamtranquocviet opened this issue Mar 8, 2019 · 1 comment

Comments

@phamtranquocviet
Copy link

Hi,
After loading the image, I need to a) crop, b) save it, c) crop again from the same image, and d) save again. After the first save, I need to clear the preview. How do I do that?

I successfully use ViewChild to get to the img element and clear src attribute. The cropped image did go away. However, cropping the next image (step c above) does not show the cropped image in the preview any more.

Any idea how to reset the preview?
Thanks.

@kaisapp16
Copy link

Try hide then show like this

at ts file
this.ratio=false;
setTimeout(() => {
this.ratio=true;
}, 50);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants