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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addition of @loading event #14

Merged
merged 2 commits into from Mar 12, 2019

Conversation

@Sammyjo20
Copy link

commented Mar 12, 2019

I've added two lines of code, each to emit a "loading" event. The event will be fired when the PDF is loaded and after the PDF has been drawn. I've added self.$emit('loading', true); just after you invoke the createLoadingTask method. Hope that's correct! 馃帀

@arkokoley

This comment has been minimized.

Copy link
Owner

commented Mar 12, 2019

Looks good! I can see why this is a good feature to have but I would like to know your thoughts on the use case for this event.

@Sammyjo20

This comment has been minimized.

Copy link
Author

commented Mar 12, 2019

Looks good! I can see why this is a good feature to have but I would like to know your thoughts on the use case for this event.

Sure! So in the app I'm currently working on, there are a lot of moving parts that go with the PDF such as Ajax calls when the PDF is loaded, and by having an event that is fired, I can change my state so the whole app can see the state of the PDF, I couldn't seem to think of a way to emit an event using the "loading" prop.

@arkokoley arkokoley merged commit 4e52bf5 into arkokoley:master Mar 12, 2019
1 check was pending
1 check was pending
Semantic Pull Request add a semantic commit or PR title
Details
@arkokoley

This comment has been minimized.

Copy link
Owner

commented Mar 12, 2019

Will publish in v1.3.0.

@Sammyjo20

This comment has been minimized.

Copy link
Author

commented Mar 12, 2019

Awesome! Thanks for making such a good wrapper btw, I tried Vue-Pdf and it just had really annoying issues with changing the pages, but this worked perfectly for our project's use case. Rock on!

@arkokoley

This comment has been minimized.

Copy link
Owner

commented Mar 12, 2019

Awesome! Thanks for making such a good wrapper btw, I tried Vue-Pdf and it just had really annoying issues with changing the pages, but this worked perfectly for our project's use case. Rock on!

@Sammyjo20 I have the same story. I used vue-pdf but I got stuck with the text layer. Glad this was useful for you!

@arkokoley

This comment has been minimized.

Copy link
Owner

commented Mar 13, 2019

@Sammyjo20 v1.3.0 is up.

@Sammyjo20

This comment has been minimized.

Copy link
Author

commented Mar 13, 2019

@Sammyjo20 v1.3.0 is up.

Ahh you're the man! Thanks a bunch 馃挴

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can鈥檛 perform that action at this time.