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

Ensuring Reactivity #54

Closed
MM-coder opened this issue Sep 7, 2023 · 1 comment · Fixed by #65
Closed

Ensuring Reactivity #54

MM-coder opened this issue Sep 7, 2023 · 1 comment · Fixed by #65

Comments

@MM-coder
Copy link

MM-coder commented Sep 7, 2023

How can I pass a ref to the `usePDF´ to properly ensure reactivity so that if the ref's value changes the PDF will change.

My current implementation is linked below:
https://github.com/librecharts/webpage/blob/master/src/components/PDFViewer.vue

This has a few shortcomings:

  • It re-assigns refs which shouldn't be done
  • Rotation does not work
  • Desctruction does not work (the canvas remains)

Are refs and reactivity a planned thing for this library?

Kind regards
Mauro M.

@TaTo30
Copy link
Owner

TaTo30 commented Sep 8, 2023

Hi,

usePDF is an additional feature in order to do "easy" implementations and its use isn't required at all as explained here: https://tato30.github.io/VuePDF/guide/composables.html#custom, it wasn't planned as reactivity thing but you have a point that is very awful re-assigns refs objects, i will think on some workarounds.

Meanwhile you can try to follow this example: https://tato30.github.io/VuePDF/examples/advanced/multiple_pdf.html

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

Successfully merging a pull request may close this issue.

2 participants